From f297b90d4089b5bfe2f63010a6800e8d52047771 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 1 May 2012 23:37:43 -0400 Subject: v3: hub (seek finer grained control over what happens when; causes breakage) * (primarily) cycle files then options (instead of options then files) * manifest re-run on (currently generated) translated files if any --- lib/sisu/v3/options.rb | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'lib/sisu/v3/options.rb') diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb index 3db80231..0876604d 100644 --- a/lib/sisu/v3/options.rb +++ b/lib/sisu/v3/options.rb @@ -62,10 +62,10 @@ module SiSU_Commandline require_relative 'sysenv' # sysenv.rb @@base_path=nil class Options - attr_accessor :cmd,:mod,:act,:dir_structure_by,:f_pths,:files,:base_path,:base_stub,:sub_location,:paths,:lngs,:f_pth,:pth,:fns,:fnb,:fnc,:fncb,:lng,:lng_base,:what + attr_accessor :cmd,:mod,:act,:dir_structure_by,:f_pths,:files,:files_mod,:base_path,:base_stub,:sub_location,:paths,:lngs,:f_pth,:pth,:fno,:fns,:fnb,:fnc,:fncb,:lng,:lng_base,:what def initialize(a) - @cmd,@f_pth,@pth,@fns,@fnb,@fnc,@fncb,@what,@lng,@lng_base,@base_path,@base_stub,@sub_location='','','','','','','','','','','','','' - @f_pths,@files,@paths,@mod,@act=Array.new(5){[]} + @cmd,@f_pth,@pth,@fno,@fns,@fnb,@fnc,@fncb,@what,@lng,@lng_base,@base_path,@base_stub,@sub_location='','','','','','','','','','','','','','' + @f_pths,@files,@files_mod,@paths,@mod,@act=Array.new(5){[]} @env=SiSU_Env::InfoEnv.new @lng_base=@env.language_default_set @dir_structure_by=SiSU_Env::EnvCall.new.output_dir_structure.by? @@ -448,6 +448,14 @@ module SiSU_Commandline else { bool: false, set: :na, inst: '' } end + act[:processing_path]=if mod.inspect =~/"--processing-path=/ + base_pth=mod.join(';').gsub(/^.*--processing-path=['"]?(.+?)(?:['"]?;.+)?$/,'\1') + { bool: true, set: :on, inst: base_pth } + elsif mod.inspect =~/"--processing-path/ + { bool: true, set: :on, inst: @base_path } + else + { bool: false, set: :na, inst: nil } + end act[:dump]=if mod.inspect =~/"--dump=/ base_pth=mod.join(';').gsub(/^.*--dump=['"]?(.+?)(?:['"]?;.+)?$/,'\1') { bool: true, set: :on, inst: base_pth } @@ -753,6 +761,11 @@ module SiSU_Commandline def act @act end + def files_mod + files_mod=files + @files_mod=files_mod + @files_mod + end def f_pth @f_pth end @@ -768,6 +781,9 @@ module SiSU_Commandline def lng_base @lng_base end + def fno + @fno + end def fns @fns end @@ -780,12 +796,14 @@ module SiSU_Commandline end end def fnc - @fnc=if @fns =~/\.(?:ssm\.sst|ssm)$/; fnb + '.ssm.sst' + @fnc=if @fns =~/\.(?:ssm\.sst|ssm)$/ + fnb + '.ssm.sst' else @fns end end def fncb - @fncb=if @fns =~/(?:\~\S{2,3})?\.(?:ssm\.sst|ssm)$/; fnb + '.ssm.sst' + @fncb=if @fns =~/(?:\~\S{2,3})?\.(?:ssm\.sst|ssm)$/ + fnb + '.ssm.sst' else @fns.gsub(/(?:\~\S{2,3})?(\.sst)$/,'\1') end end -- cgit v1.2.3