aboutsummaryrefslogtreecommitdiffhomepage
path: root/debian
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-03-06 18:29:25 -0500
committerRalph Amissah <ralph@amissah.com>2013-03-06 18:32:11 -0500
commit29a35ec455a1d5265581b58652c9420506ddd978 (patch)
tree4f10737236ee541a869b9e1ba95aa58fad73c4c2 /debian
parentMerge tag 'sisu_4.0.11' into debian/sid (diff)
debian/bin/sisu, follow bin/sisu (changes)
Diffstat (limited to 'debian')
-rw-r--r--debian/bin/sisu28
1 files changed, 11 insertions, 17 deletions
diff --git a/debian/bin/sisu b/debian/bin/sisu
index d97c37b0..b14b2dfa 100644
--- a/debian/bin/sisu
+++ b/debian/bin/sisu
@@ -82,30 +82,24 @@ WOK
'v4'
end
end
-#% $0
+#% $0 File.expand_path($0)
e=Config::CONFIG
- SiSU_lib="sisu/#{SiSU_version_dir}"
- sisu_path_specified_lib_=if $0 =~ /^#{e['bindir']}\/sisu[34]?$/
+ SiSU_path_base=if $0 =~ /^#{e['bindir']}\/sisu[34]?$/
nil
elsif $0 !~ /^#{e['bindir']}\/sisu[34]?$/ \
- && $0 =~/bin\/sisu[34]?$/ \
- && FileTest.file?($0)
- $0.sub(/bin\/sisu[34]?$/,'lib').
- sub(/^lib$/,"#{Dir.pwd}/lib")
- elsif $0 !~ /^#{e['bindir']}\/sisu[34]?$/ \
- && $0 =~/^sisu[34]?$/ \
+ && File.expand_path($0) =~/bin\/sisu[34]?$/ \
&& FileTest.file?($0)
- $0.sub(/sisu[34]?$/,'../lib')
- #bug, relative path does not work for sisu version information
- else
- nil
- end
- SiSU_path_specified_Version_=if sisu_path_specified_lib_
- sisu_path_specified_lib_.sub(/\/lib/,
- "/data/sisu/#{SiSU_version_dir}/v/version.yml")
+ File.expand_path($0).sub(/\/bin\/sisu[34]?$/,'')
else
nil
end
+ SiSU_lib="sisu/#{SiSU_version_dir}"
+ sisu_path_specified_lib_=SiSU_path_base \
+ ? File.expand_path($0).sub(/bin\/sisu[34]?$/,'lib')
+ : nil
+ SiSU_path_specified_Version_=SiSU_path_base \
+ ? "#{SiSU_path_base}/data/sisu/#{SiSU_version_dir}/v/version.yml"
+ : nil
SiSU_path_lib="#{require_hub_path(sisu_path_specified_lib_)}"
#% $*
require "#{SiSU_path_lib}/hub"