diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-09-05 11:04:42 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-09-05 11:08:50 -0400 |
commit | 22f6ac004b2b86d8554ddbc5650aa3f11d348d90 (patch) | |
tree | 1d25a04955e2915b89a306bbccc7b3bd57f8e994 /lib/sisu/v3/options.rb | |
parent | v3: Dir.chdir, remove "system cd" (change directory) use Dir.chdir (diff) |
v3: sisupod_v3 make (build); place (rsync); process (generate sisu output from)sisu_3.0.17sisu-3.0.17
* sisupod v3
* modify pod dir structure, place sisu source in dir/[lang_code]/ e.g. dir/en/
* use tar.xz (.txz)
* bundle all language version in pod
* bundle .ssm and all included files for each selected language (rather
than composited .ssm.sst file)
(filename pattern) or named in files to be processed string
* remote placement
* sisu processing from sisupod v3
* rsync sisupod v3
* sysenv, check that tree is available and use as desired when available
Diffstat (limited to 'lib/sisu/v3/options.rb')
-rw-r--r-- | lib/sisu/v3/options.rb | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb index 77031ea4..ac31a896 100644 --- a/lib/sisu/v3/options.rb +++ b/lib/sisu/v3/options.rb @@ -62,9 +62,9 @@ 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,:paths,:lngs,:f_pth,:pth,:fns,:fnb,:fnc,:fncb,:lng,:lng_base,:what + 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 def initialize(a) - @cmd,@f_pth,@pth,@fns,@fnb,@fnc,@fncb,@what,@lng,@lng_base,@base_path,@base_stub='','','','','','','','','','','','','' + @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){[]} @env=SiSU_Env::Info_env.new @lng_base=@env.language_default_set @@ -197,12 +197,18 @@ module SiSU_commandline a.uniq.each do |x| if x =~/^-[a-z0-5]+/i \ or x =~/^--\S+/ - if x =~/^-([a-z0-5]+)/i; c << $1 + if x =~/^-([a-z0-5]+)/i + c << $1 end - if x =~/^--\S+/; m << x + if x =~/^--\S+/ + m << x end - elsif x =~ /(?:\.(?:(?:-|ssm\.)?sst(?:\.xml)?|ssm|ssi|sx[sdn]\.xml|s[1-3]|kdi|ssp)|\S+?\.ss[mt]\.zip|sisupod(\.zip)?)$/ - if x =~/^(?:https?|file):\/\/\S+/; f << x + elsif x =~ /(?:\.(?:(?:-|ssm\.)?sst(?:\.xml)?|ssm|ssi|sx[sdn]\.xml|s[1-3]|kdi|ssp)|\S+?\.ss[mt]\.txz|sisupod(\.txz)?)$/ + if x =~/^(?:https?|file):\/\/\S+/ \ + or x =~/\S+?\.ss[mt]\.txz|sisupod\.txz/ \ + && FileTest.file?(x) + x=x.gsub(/^file:\/\//,'') + f << x elsif FileTest.file?(x) ### FIX pt=Pathname.new(x) @@ -586,6 +592,9 @@ module SiSU_commandline def pth @pth end + def sub_location + pth.gsub(/#{base_path}/,'') + end def lng @lng end |