aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/options.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/options.rb')
-rw-r--r--lib/sisu/v5/options.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/sisu/v5/options.rb b/lib/sisu/v5/options.rb
index 591bb990..e7d0f023 100644
--- a/lib/sisu/v5/options.rb
+++ b/lib/sisu/v5/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')