From a8472db6a89056fa93a859a4806ae1e9f182cab4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 3 Oct 2011 21:06:51 -0400 Subject: v3: sysenv, rc_path adds ./.sisu/ (to existing ./_sisu/ & ~/.sisu/) --- data/doc/sisu/CHANGELOG_v3 | 2 ++ lib/sisu/v3/sysenv.rb | 19 ++++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index bd03755b..1a7a889c 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -23,6 +23,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.1.0.orig.tar.xz * bin/sisu, default sisu version 3 + * sysenv, rc_path adds ./.sisu/ (to existing ./_sisu/ & ~/.sisu/) + %% 3.0.19.orig.tar.xz (2011-09-24:38/6) http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu-3.0.19 http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.0.19-1 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 -- cgit v1.2.3