aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/sysenv.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-10-03 21:06:51 -0400
committerRalph Amissah <ralph@amissah.com>2011-10-03 21:06:51 -0400
commita8472db6a89056fa93a859a4806ae1e9f182cab4 (patch)
tree729a478b3e9490a3a6d61bb11e070cfd2ca2e053 /lib/sisu/v3/sysenv.rb
parentv2 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.rb19
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