From fed01af686fb007454eafff9127b16a6516b50c0 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 17 Jun 2012 22:38:31 -0400 Subject: v3: shared_sisupod_source, common build for sisu (markup) source representations * to be used by sisupod.txz, git, (and src) * sisupod_make (--sisupod) * share_source (--source) NOTE not used git at present * changed representation of shared sisu source, include related files in directory rather than just markup file [reason for version bump] NOTE there are no changes to sisu markup (only the sharing of source files) --- lib/sisu/v3/options.rb | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'lib/sisu/v3/options.rb') 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 -- cgit v1.2.3