diff options
Diffstat (limited to 'lib')
-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 |