From 0081730547d53f86744f61f772657c34e8c5149b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 24 Sep 2011 08:12:12 -0400 Subject: v3: remote, src & sisupod processing, and rsync placement --- lib/sisu/v3/hub.rb | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) (limited to 'lib/sisu/v3/hub.rb') diff --git a/lib/sisu/v3/hub.rb b/lib/sisu/v3/hub.rb index 8bd1cb7a..584845ba 100644 --- a/lib/sisu/v3/hub.rb +++ b/lib/sisu/v3/hub.rb @@ -156,11 +156,20 @@ module SiSU break else put=fns.gsub(/(.+)?\.ssm\.sst$/,'\1.ssm') - @opt.fns=fns - @opt.pth=@opt.paths[i] - @opt.f_pth=@opt.f_pths[i] - @opt.lng=@opt.lngs[i] - @@pwd=@opt.pth + if fns !~/\.-sst$/ + @opt.fns=fns + @opt.pth=@opt.paths[i] + @opt.f_pth=@opt.f_pths[i] + @opt.lng=@opt.lngs[i] + @@pwd=@opt.pth + else + @opt.fns=fns + @opt.pth=Dir.pwd + @opt.f_pth=@opt.f_pths[i] #@opt.f_pth= { pth: Dir.pwd } + @opt.lng='en' + #@opt.lng=@opt.lngs[i] + @@pwd=@opt.pth + end Dir.chdir(@opt.pth) #watch env=SiSU_Env::Info_env.new(fns) if @req !~/(?:urls|remote)$/ @@ -427,12 +436,12 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ path_image='./_sisu/processing/external_document/image' path_skin='./_sisu/processing/external_document/skin/doc' @get_s,@get_p,@get_pl=[],[],[] - re_s=/((?:https?|file):\/\/\S+?\.sst)$/ + re_s=/(\S+?\.-sst)$/ re_p3=/((?:https?|file):\/\/\S+?(?:\/\S+?\.ss[mt]\.txz|sisupod(?:\.txz)?|\.ssp))/ re_pl3=/^(\/\S+?\.ss[mt]\.txz)/ @opt.files.each do |fns| if fns =~re_s - @get_s << re_s.match(fns)[1] if re_s + @get_s << @opt.f_pths[0][:url] end if fns =~re_p3 @get_p << re_p3.match(fns)[1] if re_p3 @@ -441,21 +450,18 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ @get_pl << re_pl3.match(fns)[1] if re_p3 end end - re_p2=/((?:https?|file):\/\/\S+?(?:\/\S+?\.ss[mt]\.zip|sisupod(?:\.zip)?|\.ssp))/ - re_pl2=/^(\/\S+?\.ss[mt]\.zip)/ - @opt.files.each do |fns| - if fns =~re_s - @get_s << re_s.match(fns)[1] if re_s - end - if fns =~re_p2 - @get_p << re_p2.match(fns)[1] if re_p2 - end - if fns =~re_pl2 - @get_pl << re_pl2.match(fns)[1] if re_p2 - end - end - if @get_s.length > 0 #% remote markup file .sst - require_relative 'remote' # remote.rb + #re_p2=/((?:https?|file):\/\/\S+?(?:\/\S+?\.ss[mt]\.zip|sisupod(?:\.zip)?|\.ssp))/ + #re_pl2=/^(\/\S+?\.ss[mt]\.zip)/ + #@opt.files.each do |fns| + # if fns =~re_p2 + # @get_p << re_p2.match(fns)[1] if re_p2 + # end + # if fns =~re_pl2 + # @get_pl << re_pl2.match(fns)[1] if re_p2 + # end + #end + if @get_s.length > 0 #% remote markup file .sst + require_relative 'remote' # remote.rb SiSU_Remote::Get.new(@opt,@get_s).fns Operations.new.counter end -- cgit v1.2.3