diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-10-03 00:15:31 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-10-03 00:15:31 -0400 |
commit | ac4a6aaa1f4db1237f2a0192a5dc63c8c4057be9 (patch) | |
tree | d4147b4096aea00b6236a81aba962830c6b8400a /lib/sisu/v4/options.rb | |
parent | v4: 4.0.0 new branch & version & changelog "opened" (diff) |
v4: bin/sisu $0, make possible to run sisu command on/within project dir tree
* (previously sisu needed to be correctly installed with system paths honored)
* NOTE: loading of skins turned off
Diffstat (limited to 'lib/sisu/v4/options.rb')
-rw-r--r-- | lib/sisu/v4/options.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/sisu/v4/options.rb b/lib/sisu/v4/options.rb index 39c392a9..d2898bfd 100644 --- a/lib/sisu/v4/options.rb +++ b/lib/sisu/v4/options.rb @@ -59,7 +59,7 @@ module SiSU_Commandline require 'pathname' require_relative 'sysenv' # sysenv.rb - @@base_path=nil + @@sisu_call_origin_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,:fng,:fncb,:lng,:lng_base,:what @@act=nil @@ -69,8 +69,8 @@ module SiSU_Commandline @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 + @@sisu_call_origin_path ||=Dir.pwd + @base_path=@@sisu_call_origin_path r=Px[:lng_lst_rgx] u=/.+?\/([^\/]+)(?:\/(?:#{r})$|$)/ @base_stub=@base_path.gsub(u,'\1') @@ -181,9 +181,9 @@ module SiSU_Commandline @lngs = q[:lngs] if @files.length > 0 \ and @cmd.empty? \ - and @mod.length==0 #% if no other action called on filename given, default is sisu --v3 -0 [filename(s)] configured as flag default + and @mod.length==0 #% if no other action called on filename given, default is sisu --v4 -0 [filename(s)] configured as flag default shortcut=SiSU_Env::InfoProcessingFlag.new - @mod=['--v3'] + @mod=['--v4'] @cmd=shortcut.cf_0 + 'm' end if @cmd =~/[vVM]/ \ |