From ebc9b30cafa7d4ef1fcca7eeb82207dd2572d4c2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 15 Jul 2014 18:25:31 -0400 Subject: v5 v6: bin/sisu, hub, options, pass message: sisu_called_from_directory --- lib/sisu/v6/options.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'lib/sisu/v6/options.rb') diff --git a/lib/sisu/v6/options.rb b/lib/sisu/v6/options.rb index e181ee8e..1850c6d4 100644 --- a/lib/sisu/v6/options.rb +++ b/lib/sisu/v6/options.rb @@ -69,7 +69,6 @@ module SiSU_Commandline end require_relative 'sysenv' # sysenv.rb require_relative 'param_make' # param_make.rb - @@sisu_call_origin_path=nil class HeaderCommon def sisu_document_make_instructions @pagenew= @@ -155,18 +154,18 @@ module SiSU_Commandline end end class Options - attr_accessor :cmd,:mod,:act,:dir_structure_by,:lingual,: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,:make_instructions,:make_instructions_pod + attr_accessor :cmd,:mod,:act,:dir_structure_by,:lingual,:f_pths,:files,:files_mod,:call_path,:base_path,:base_stub,:sub_location,:paths,:lngs,:f_pth,:pth,:fno,:fns,:fnb,:fnc,:fng,:fncb,:lng,:lng_base,:what,:make_instructions,:make_instructions_pod @@act=nil - def initialize(a) - @cmd,@f_pth,@pth,@fno,@fns,@fnb,@fnc,@fng,@fncb,@what,@lng,@lng_base,@base_path,@base_stub,@sub_location= - '', '', '', '', '', '', '', '', '', '', '', '', '', '', '' + def initialize(a,call_path) + @cmd=@f_pth=@pth=@fno=@fns=@fnb=@fnc=@fng=@fncb=@what=@lng=@lng_base=@call_path=@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? @lingual=SiSU_Env::EnvCall.new.mono_multi_lingual? - @@sisu_call_origin_path ||=Dir.pwd - @base_path=@@sisu_call_origin_path + @call_path=call_path + @base_path= + call_path.gsub(/(^|\/)(?:#{Px[:lng_lst_rgx]})$/,'') r=Px[:lng_lst_rgx] u=/.+?\/([^\/]+)(?:\/(?:#{r})$|$)/ @base_stub=@base_path.gsub(u,'\1') -- cgit v1.2.3