aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/options.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/options.rb')
-rw-r--r--lib/sisu/v3/options.rb28
1 files changed, 23 insertions, 5 deletions
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