diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-10-03 21:06:51 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-10-03 21:06:51 -0400 |
commit | a8472db6a89056fa93a859a4806ae1e9f182cab4 (patch) | |
tree | 729a478b3e9490a3a6d61bb11e070cfd2ca2e053 /lib/sisu/v3/sysenv.rb | |
parent | v2 v3: bin/sisu, default sisu version 3 (diff) |
v3: sysenv, rc_path adds ./.sisu/ (to existing ./_sisu/ & ~/.sisu/)
Diffstat (limited to 'lib/sisu/v3/sysenv.rb')
-rw-r--r-- | lib/sisu/v3/sysenv.rb | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index ed2d74dc..9d4fa887 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -216,13 +216,26 @@ module SiSU_Env @@default_dir=DEFAULT_DIR m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m stub_pwd=@@pwd[m,1] - @@rc_path=["#{@@pwd}/_sisu/#{SiSU_version_dir}","#{@@pwd}/_sisu","#{@@home}/.sisu/#{SiSU_version_dir}","#{@@home}/.sisu","#{@@sisu_etc}/#{SiSU_version_dir}"] - @@yamlrc_path=["#{@@pwd}/_sisu/#{SiSU_version_dir}","#{@@pwd}/_sisu","#{@@home}/.sisu/#{SiSU_version_dir}","#{@@home}/.sisu","#{@@sisu_etc}/#{SiSU_version_dir}"] + @@rc_path=[ + "#{@@pwd}/.sisu/#{SiSU_version_dir}", + "#{@@pwd}/.sisu", + "#{@@pwd}/_sisu/#{SiSU_version_dir}", + "#{@@pwd}/_sisu", + "#{@@home}/.sisu/#{SiSU_version_dir}", + "#{@@home}/.sisu", + "#{@@sisu_etc}/#{SiSU_version_dir}", + ] + @@yamlrc_path=@@rc_path #@@yamlrc_path=(stub_pwd !~/^sisupod$/) \ #? (["#{@@pwd}/_sisu/#{SiSU_version_dir}","#{@@pwd}/_sisu","#{@@home}/.sisu/#{SiSU_version_dir}","#{@@home}/.sisu","#{@@sisu_etc}/#{SiSU_version_dir}"]) #: ["#{@@home}/.sisu/#{SiSU_version_dir}","#{@@home}/.sisu","#{@@sisu_etc}/#{SiSU_version_dir}"] #security policy: prevent reading of sisurc.yml in sisupod @@ad_path=(stub_pwd !~/^sisupod$/) \ - ? (["#{@@pwd}/_sisu/skin/yml","#{@@home}/.sisu/skin/yml","#{@@sisu_etc}/skin/yml"]) + ? ([ + "#{@@pwd}/.sisu/skin/yml", + "#{@@pwd}/_sisu/skin/yml", + "#{@@home}/.sisu/skin/yml", + "#{@@sisu_etc}/skin/yml", + ]) : ["#{@@home}/.sisu",@@sisu_etc] attr_accessor :user,:home,:hostname,:pwd,:host,:arch,:rbver,:dir_arch,:dir_sitearch,:dir_bin,:locale,:webserv_path,:webserv_host_cgi,:webserv_port_cgi,:default_dir,:rc_path,:yamlrc_path,:ad_path def initialize |