diff options
Diffstat (limited to 'lib/sisu/v3/options.rb')
-rw-r--r-- | lib/sisu/v3/options.rb | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb index c7789f3a..7aa3622d 100644 --- a/lib/sisu/v3/options.rb +++ b/lib/sisu/v3/options.rb @@ -61,16 +61,16 @@ module SiSU_Commandline require_relative 'sysenv' # sysenv.rb @@base_path=nil class Options - 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 + 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,:fng,:fncb,:lng,:lng_base,:what def initialize(a) - @cmd,@f_pth,@pth,@fno,@fns,@fnb,@fnc,@fncb,@what,@lng,@lng_base,@base_path,@base_stub,@sub_location='','','','','','','','','','','','','','' + @cmd,@f_pth,@pth,@fno,@fns,@fnb,@fnc,@fng,@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? @@base_path ||=Dir.pwd @base_path=@@base_path - r=Px[:lng_lst].join('|') + r=Px[:lng_lst_rgx] u=/.+?\/([^\/]+)(?:\/(?:#{r})$|$)/ @base_stub=@base_path.gsub(u,'\1') @a=sisu_glob_rules(a) @@ -139,8 +139,7 @@ module SiSU_Commandline end end end - r=Px[:lng_lst].join('|') - r=r.gsub(/\|#{@lng_base}\|/,'|') + r=Px[:lng_lst_rgx].gsub(/\|#{@lng_base}\|/,'|') @lang_regx=%r{(?:#{r})} z=if find_flag (f.length > 0) \ @@ -225,7 +224,7 @@ module SiSU_Commandline chdir #{pwd} ") Dir.chdir(pt.realpath.to_s + '/sisupod/doc') - r=Px[:lng_lst].join('|') + r=Px[:lng_lst_rgx] Dir.entries("#{fullname}/sisupod/doc").each do |d_lng| if d_lng =~/^(?:#{r})$/ Dir.chdir(pt.realpath.to_s + "/sisupod/doc/#{d_lng}") @@ -816,12 +815,21 @@ module SiSU_Commandline @lng_base end def fno - @fno=if @fno and not @fno.empty? + @fno=if @fno \ + and not @fno.empty? @fno else fns[/(.+?(?:sst|ssm))(?:\.sst)?/,1] end end + def fng + @fng=if @fng \ + and not @fng.empty? + @fng + else + fno.gsub(/(?:~(?:#{Px[:lng_lst_rgx]}))?(\.ss[tm])$/,'\1') + end + end def fns @fns end |