diff options
Diffstat (limited to 'lib/sisu/v0/options.rb')
-rw-r--r-- | lib/sisu/v0/options.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/sisu/v0/options.rb b/lib/sisu/v0/options.rb index 8b014c04..7f94306e 100644 --- a/lib/sisu/v0/options.rb +++ b/lib/sisu/v0/options.rb @@ -58,9 +58,9 @@ module SiSU_commandline require "#{SiSU_lib}/sysenv" class Options - attr_accessor :cmd,:mod,:files,:fns,:fnb,:what + attr_accessor :cmd,:mod,:files,:fns,:fnb,:fnc,:fncb,:what def initialize(a) - @cmd,@files,@fns,@fnb,@what,c,w,s='','','','','','','','','' + @cmd,@files,@fns,@fnb,@fnc,@fncb,@what,c,w,s='','','','','','','','','','','' @files,@mod,m,f,z,ca=[],[],[],[],[],[] @env=SiSU_Env::Info_env.new shortcut=SiSU_Env::Info_processing_flag.new @@ -165,6 +165,16 @@ module SiSU_commandline fns[/(.+?)\.(?:[_-]?sst|ssm)$/,1] end end + def fnc + @fnc=if @fns =~/\.(?:_sst|ssm)$/; fnb + '.ssm.sst' + else @fns + end + end + def fncb + @fncb=if @fns =~/(?:\~\S{2,3})?\.(?:_sst|ssm)$/; fnb + '.ssm.sst' + else @fns.gsub(/(?:\~\S{2,3})?(\.sst)$/,'\1') + end + end end end __END__ |