diff options
author | Ralph Amissah <ralph@amissah.com> | 2013-04-08 20:06:11 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2013-04-08 20:06:11 -0400 |
commit | 64e5514f4b05ac5f54c564e1fb4ba33b64a7e3bb (patch) | |
tree | 70292ae31c0fa54d024a31e9210ef4cef2b7e7ad /lib/sisu/v4/zap.rb | |
parent | debian/changelog (4.0.18-1) (diff) | |
parent | v4: version & changelog, dates touched (diff) |
Merge tag 'sisu_4.0.19' into debian/sid
SiSU 4.0.19
Diffstat (limited to 'lib/sisu/v4/zap.rb')
-rw-r--r-- | lib/sisu/v4/zap.rb | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/lib/sisu/v4/zap.rb b/lib/sisu/v4/zap.rb index fbda244f..42f41fb7 100644 --- a/lib/sisu/v4/zap.rb +++ b/lib/sisu/v4/zap.rb @@ -66,20 +66,23 @@ module SiSU_Zap class Source def initialize(opt) @opt=opt - @env=SiSU_Env::InfoEnv.new(@opt.fns) - @zap_path="#{@env.path.output}/#{@env.fnb}" - @zap=SiSU_Env::CleanOutput.new(@opt) + @env=SiSU_Env::InfoEnv.new(opt.fns) end def read + zap_path="#{@env.path.output}/#{@env.fnb}" + z=SiSU_Env::CleanOutput.new(@opt) if SiSU_Env::InfoSettings.new.permission?('zap') - tell=SiSU_Screen::Ansi.new(@opt.cmd,"Clean files related to processing #{@opt.cmd} ->","#{@opt.fns} -> #{@zap_path}") - @zap.zap.main_output - @zap.zap.site_map - @zap.zap.epub - @zap.zap.src - else tell=SiSU_Screen::Ansi.new(@opt.cmd,'use of -Z (zap) has not enabled in sisurc.yml') + unless @opt.cmd =~/q/ + tell=SiSU_Screen::Ansi.new(@opt.cmd,"Clean files related to processing #{@opt.cmd} ->","#{@opt.fns} -> #{zap_path}") + tell.warn + end + z.zap.remove_output + else + unless @opt.cmd =~/q/ + tell=SiSU_Screen::Ansi.new(@opt.cmd,'use of -Z (zap) has not enabled in sisurc.yml') + tell.warn + end end - tell.warn unless @opt.cmd =~/q/ end end end |