diff options
author | Ralph Amissah <ralph@amissah.com> | 2013-03-08 20:55:21 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2013-03-08 20:55:21 -0500 |
commit | bb9f9d8e19d53a21f9154a2dad3c6ea46f6ff547 (patch) | |
tree | 63827d1bfc6feb186f9df1053e223a86027b94c6 /lib/sisu/v4/options.rb | |
parent | debian/changelog (4.0.11-1) (diff) | |
parent | v4: version & changelog, dates touched (diff) |
Merge tag 'sisu_4.0.12' into debian/sid
SiSU 4.0.12
Diffstat (limited to 'lib/sisu/v4/options.rb')
-rw-r--r-- | lib/sisu/v4/options.rb | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/lib/sisu/v4/options.rb b/lib/sisu/v4/options.rb index 724fd9a9..0608df4e 100644 --- a/lib/sisu/v4/options.rb +++ b/lib/sisu/v4/options.rb @@ -1029,36 +1029,38 @@ module SiSU_Commandline @lng_base end def fno - @fno=fns[/(.+?(?:sst|ssm))(?:\.sst)?/,1] + @fno=(fns.nil? || fns.empty?) \ + ? '' \ + : (fns[/(.+?(?:sst|ssm))(?:\.sst)?/,1]) end def fng - @fng=fno.gsub(/(?:~(?:#{Px[:lng_lst_rgx]}))?(\.ss[tm])$/,'\1') + @fng=(fno.nil? || fno.empty?) \ + ? '' \ + : (fno.gsub(/(?:~(?:#{Px[:lng_lst_rgx]}))?(\.ss[tm])$/,'\1')) end def fns @fns end def fnl - x=@fns.gsub(/(\S+?)((?:\.ssm)?\.sst)/,"\\1.#{lng}\\2") + @fns.gsub(/(\S+?)((?:\.ssm)?\.sst)/,"\\1.#{lng}\\2") end def what @what end def fnb - unless fns.empty? - fns[/(.+?)\.(?:(?:-|ssm\.)?sst|ssm)$/,1] - end + (fns.nil? || fns.empty?) \ + ? '' \ + : (fns[/(.+?)\.(?:(?:-|ssm\.)?sst|ssm)$/,1]) end def fnc - @fnc=if @fns =~/\.(?:ssm\.sst|ssm)$/ - fnb + '.ssm.sst' - else @fns - end + @fnc=(@fns =~/\.(?:ssm\.sst|ssm)$/) \ + ? fnb + '.ssm.sst' + : @fns end def fncb - @fncb=if @fns =~/(?:\~\S{2,3})?\.(?:ssm\.sst|ssm)$/ - fnb + '.ssm.sst' - else @fns.gsub(/(?:\~\S{2,3})?(\.sst)$/,'\1') - end + @fncb=(@fns =~/(?:\~\S{2,3})?\.(?:ssm\.sst|ssm)$/) \ + ? fnb + '.ssm.sst' + : @fns.gsub(/(?:\~\S{2,3})?(\.sst)$/,'\1') end end end |