From d2a0dcbc681948219391aa507742347756475905 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 7 Apr 2013 22:18:03 -0400 Subject: v4: zap, delete output files, based on given (existing) source file name --- lib/sisu/v4/hub.rb | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'lib/sisu/v4/hub.rb') diff --git a/lib/sisu/v4/hub.rb b/lib/sisu/v4/hub.rb index 70a9fc9a..0691ff37 100644 --- a/lib/sisu/v4/hub.rb +++ b/lib/sisu/v4/hub.rb @@ -259,6 +259,9 @@ module SiSU @tell=lambda { SiSU_Screen::Ansi.new(@opt.cmd,@msg,"#{@msgs.inspect if @msgs}") } end def do_loops + if @opt.act[:zap][:set]==:on #% --zap, -Z + do_loop_files_on_given_option_pre + end do_each_file_loop_options do_loop_files_on_given_option_post end @@ -367,16 +370,15 @@ module SiSU end end end - def loop_files_on_given_option_pre_do - if @opt.act[:sisupod][:set]==:on #% --sisupod, -S make sisupod - require_relative 'sisupod_make' # -S sisupod_make.rb - begin + def do_loop_files_on_given_option_pre + begin + if @opt.act[:zap][:set]==:on #% --zap, -Z OptionLoopFiles.new(@opt).loop_files_on_given_option do - SiSU_Doc::Source.new(@opt).read + require_relative 'zap' + SiSU_Zap::Source.new(@opt).read # -Z zap.rb end - ensure - SiSU_Doc::Source.new(@opt).sisupod_tar_xz end + ensure end end def do_loop_files_on_given_option_post @@ -479,12 +481,6 @@ module SiSU SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb end end - if @opt.act[:zap][:set]==:on #% --zap, -Z - # OptionLoopFiles.new(@opt).loop_files_on_given_option do - # require_relative 'zap' - # SiSU_Zap::Source.new(@opt).read # -Z zap.rb - # end - end if @opt.act[:manifest][:set]==:on #% --manifest, -y require_relative 'manifest' OptionLoopFiles.new(@opt).manifest_on_files_translated do @@ -580,10 +576,6 @@ module SiSU if @opt.act[:webrick][:set]==:on #% --webrick, -W webrick SiSU::Operations.new(@opt).webrick end - if @opt.act[:zap][:set]==:on #% --zap -Z wipe previous output clean DUPLICATE - #require_relative 'zap' - #SiSU_Zap::Source.new(@opt).read # -Z zap.rb - end if @opt.act[:dal][:set]==:on @retry_count= -1 begin -- cgit v1.2.3