aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4/zap.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v4/zap.rb')
-rw-r--r--lib/sisu/v4/zap.rb23
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