diff options
Diffstat (limited to 'lib/sisu/v2/sisupod_make.rb')
-rw-r--r-- | lib/sisu/v2/sisupod_make.rb | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/lib/sisu/v2/sisupod_make.rb b/lib/sisu/v2/sisupod_make.rb index 0b4b56d8..c721f257 100644 --- a/lib/sisu/v2/sisupod_make.rb +++ b/lib/sisu/v2/sisupod_make.rb @@ -82,19 +82,24 @@ module SiSU_Doc rm_rf("#{@env.path.processing}sisupod/*") if FileTest.directory?("#{@env.path.processing}sisupod") end def read - tell=SiSU_Screen::Ansi.new(@opt.cmd,'Share SiSU Document (zip)',@opt.fns) - tell.green_hi_blue unless @opt.cmd =~/q/ + unless @opt.cmd =~/q/ + @opt.cmd=~/[MVvz]/ \ + ? SiSU_Screen::Ansi.new(@opt.cmd,'Share SiSU Document (zip)',@opt.fns).green_hi_blue \ + : SiSU_Screen::Ansi.new(@opt.cmd,'Share SiSU Document (zip)',@opt.fns).green_title_hi + end unless @opt.fns.empty? - tell=SiSU_Screen::Ansi.new(@opt.cmd,'Make sisu document (zip) and place in output directory',"#{@opt.fns} -> file://#{@env.path.output_pod}/#{@zipfile}.zip") - tell.warn unless @opt.cmd =~/q/ + unless @opt.cmd =~/q/ + SiSU_Screen::Ansi.new(@opt.cmd,'Make sisu document (zip) and place in output directory',"#{@opt.fns} -> file://#{@env.path.output_pod}/#{@zipfile}.zip").warn if @opt.cmd =~/[MVv]/ + end directories sisupod_build sisupod_zip #sisupod_7zip else - tell=SiSU_Screen::Ansi.new(@opt.cmd,'Make (zip) of sisu work directory',"#{@env.stub_pwd}\_#{@date}.zip") - tell.warn unless @opt.cmd =~/q/ - tell.blue_tab unless @opt.cmd =~/q/ + if @opt.cmd =~/[MVv]/ + SiSU_Screen::Ansi.new(@opt.cmd,'Make (zip) of sisu work directory',"#{@env.stub_pwd}\_#{@date}.zip").warn + SiSU_Screen::Ansi.new(@opt.cmd,'').blue_tab + end ans=@ans.response?('make sisupod of entire directory?') if ans; sisupod_zip_directory end @@ -122,12 +127,11 @@ module SiSU_Doc }) else puts "the required systemlink 'sisupod' could not be created on the current directory: remove the file or directory named 'sisupod' within #{Dir.pwd}" end - tell=SiSU_Screen::Ansi.new(@opt.cmd,'Share SiSU Document (tar gzip)',@opt.fns) - tell.green_hi_blue unless @opt.cmd =~/q/ - tell=SiSU_Screen::Ansi.new(@opt.cmd,'Zipped directory',sisupod_directory) - tell.warn unless @opt.cmd =~/q/ - tell=SiSU_Screen::Ansi.new('',sisupod_directory) - tell.blue_tab unless @opt.cmd =~/q/ + if @opt.cmd =~/[MVv]/ + SiSU_Screen::Ansi.new(@opt.cmd,'Share SiSU Document (tar gzip)',@opt.fns).green_hi_blue + SiSU_Screen::Ansi.new(@opt.cmd,'Zipped directory',sisupod_directory).warn + SiSU_Screen::Ansi.new('',sisupod_directory).blue_tab + end end def directories SiSU_Env::Info_env.new.sisupod @@ -270,8 +274,7 @@ module SiSU_Doc 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/ + SiSU_Screen::Ansi.new('',"#{@opt.fns}.7z").blue_tab unless @opt.cmd =~/q/ end def sisupod_zip mkdir_p(@local_path) unless FileTest.directory?(@local_path) @@ -283,8 +286,7 @@ module SiSU_Doc mv #{@zipfile}.zip #{@local_path}/. & rm -r sisupod/* && cd #{@env.path.pwd} }) - tell=SiSU_Screen::Ansi.new('',"#{@zipfile}.zip") - tell.blue_tab unless @opt.cmd =~/q/ + SiSU_Screen::Ansi.new('',"#{@zipfile}.zip").blue_tab if @opt.cmd =~/[MVv]/ end end end |