aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/sisupod_make.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/sisupod_make.rb')
-rw-r--r--lib/sisu/v0/sisupod_make.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/sisu/v0/sisupod_make.rb b/lib/sisu/v0/sisupod_make.rb
index 8e6932f0..10ec76e5 100644
--- a/lib/sisu/v0/sisupod_make.rb
+++ b/lib/sisu/v0/sisupod_make.rb
@@ -72,6 +72,10 @@ module SiSU_Doc
@v=if @opt.cmd =~/[VM]/; 'v'
else ''
end
+ @local_path="#{@env.path.output}/src" #@local_path="#{@env.path.output}/#{@env.fnb}"
+ @zipfile=if @opt.fns =~/\._sst$/; @opt.fns.gsub(/(?:\~\S{2,3})?\._sst$/,'.ssm')
+ else @opt.fns.gsub(/(?:\~\S{2,3})?(\.sst)$/,'\1')
+ end
File.mkpath(pod_path) unless FileTest.directory?(pod_path)
rm_rf("#{@env.path.processing}sisupod/*") if FileTest.directory?("#{@env.path.processing}sisupod")
end
@@ -79,7 +83,7 @@ module SiSU_Doc
tell=SiSU_Screen::Ansi.new(@opt.cmd,'Share SiSU Document (zip)',@opt.fns)
tell.green_hi_blue unless @opt.cmd =~/q/
unless @opt.fns.empty?
- tell=SiSU_Screen::Ansi.new(@opt.cmd,'Make sisu document (zip) and place in output directory',"#{@opt.fns}.zip -> #{@env.path.output}/#{@opt.fnb}/sisupod.zip")
+ tell=SiSU_Screen::Ansi.new(@opt.cmd,'Make sisu document (zip) and place in output directory',"#{@opt.fns} -> file://#{@env.path.output}/src/#{@zipfile}.zip")
tell.warn unless @opt.cmd =~/q/
directories
sisupod_build
@@ -240,35 +244,31 @@ module SiSU_Doc
end #NB not all possibilies met, revisit, also in case of composite file may wish to add README
end
def sisupod_7zip #look at later
- dir=SiSU_Env::Info_env.new(@opt.fns)
- local_path="#{dir.path.output}/#{dir.fnb}"
- File.mkpath(local_path) unless FileTest.directory?(local_path)
+ File.mkpath(@local_path) unless FileTest.directory?(@local_path)
system(%{
cd #{@env.path.processing}
echo "SiSU sisupod #{@ver[:version]}" > sisu_zip.txt
#7zip -qz #{@opt.fns}.7z sisu_zip.txt < sisu_zip.txt
- 7zr a -t7z -m0=lzma -mx=9 -ms=on #{@opt.fns}.7z sisu_zip.txt
- 7zr a -t7z -m0=lzma -mx=9 -ms=on #{@opt.fns}.7z sisupod
- #7zip -qr #{@opt.fns}.7z sisupod
- mv #{@opt.fns}.7z #{local_path}/sisupod.7z &
+ 7zr a -t7z -m0=lzma -mx=9 -ms=on #{@zipfile}.7z sisu_zip.txt
+ 7zr a -t7z -m0=lzma -mx=9 -ms=on #{@zipfile}.7z sisupod
+ #7zip -qr #{@zipfile}.7z sisupod
+ mv #{@zipfile}.7z #{@local_path}/. &
rm -r sisupod/* && cd #{@env.path.pwd}
})
tell=SiSU_Screen::Ansi.new('',"#{@opt.fns}.7z")
tell.blue_tab unless @opt.cmd =~/q/
end
def sisupod_zip
- dir=SiSU_Env::Info_env.new(@opt.fns)
- local_path="#{dir.path.output}/#{dir.fnb}"
- File.mkpath(local_path) unless FileTest.directory?(local_path)
+ File.mkpath(@local_path) unless FileTest.directory?(@local_path)
system(%{
cd #{@env.path.processing}
echo "SiSU sisupod #{@ver[:version]}" > sisu_zip.txt
- zip -qz #{@opt.fns}.zip sisu_zip.txt < sisu_zip.txt
- zip -qr #{@opt.fns}.zip sisupod
- mv #{@opt.fns}.zip #{local_path}/sisupod.zip &
+ zip -qz #{@zipfile}.zip sisu_zip.txt < sisu_zip.txt
+ zip -qr #{@zipfile}.zip sisupod
+ mv #{@zipfile}.zip #{@local_path}/. &
rm -r sisupod/* && cd #{@env.path.pwd}
})
- tell=SiSU_Screen::Ansi.new('',"#{@opt.fns}.zip")
+ tell=SiSU_Screen::Ansi.new('',"#{@zipfile}.zip")
tell.blue_tab unless @opt.cmd =~/q/
end
end