diff options
author | Ralph Amissah <ralph@amissah.com> | 2015-05-18 09:55:06 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2015-05-18 09:55:06 -0400 |
commit | bd3f4be045e9f1a34b4922e4b4eeb065a1c9191f (patch) | |
tree | 170e6aa01e2bf0cab4b47b2b93f0100173d734d1 /bin | |
parent | debian/changelog (7.1.0-1) (diff) | |
parent | version & changelog, tag for release (diff) |
Merge tag 'sisu_7.1.1' into debian/sid
SiSU 7.1.1
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/sisu | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -20,7 +20,7 @@ class Orient :full_path_to_sisu_bin_in_sisu_dir_tree elsif processing.sisu_runtime_path =~/\/gems\// \ and processing.sisu_runtime_path \ - =~ /\/sisu-(?:\d+|[a-z])\.(?:\d+|[a-z])\.(?:\d+|[a-z])\// + =~ /\/#{processing.gem_regex}\// :gem_install else :system_install @@ -43,7 +43,7 @@ class Orient %r{\bsisu$} end def gem_regex - %r{\/sisu-(?:\d+|[a-z])\.(?:\d+|[a-z])\.(?:\d+|[a-z])\/} + %r{sisu-[0-9]+\.[0-9]+\.[0-9]+(?:\.r[0-9]+\.g[0-9a-f]{7})?} end self end @@ -109,17 +109,20 @@ class Orient File.expand_path(processing.called_as). sub(/\/bin\/sisu$/,'/data/sisu') when :set_path_gem - Gem::Specification.find_by_name("sisu").gem_dir + '/data/sisu' + Gem::Specification.find_by_name("sisu").gem_dir \ + + '/data/sisu' else nil end end def sisu_this_lib - if processing.sisu_runtime_path =~/\/gems\// \ + if not Gem::Specification.find_by_name("sisu").nil? \ + and processing.sisu_runtime_path =~/\/gems\// \ and processing.sisu_runtime_path \ - =~ /\/sisu-(?:\d+|[a-z])\.(?:\d+|[a-z])\.(?:\d+|[a-z])\// + =~ /\/#{processing.gem_regex}\// # gem sought processing.sisu_runtime_path. - gsub(/\/bin\/sisu[a-z0-7_-]*$/,'/lib/sisu') + gsub(/\/bin\/sisu[a-z0-9._-]*$/, + '/lib/sisu') elsif (processing.called_as \ !~ /^#{RbConfig::CONFIG['bindir']}\/sisu$/) # called off file system, project directory tree @@ -128,12 +131,12 @@ class Orient else # distro installation sisulib={ - vendorlib: RbConfig::CONFIG['vendordir'] + '/sisu', + vendorlib: RbConfig::CONFIG['vendorlibdir'] + '/sisu', sitelib: RbConfig::CONFIG['sitelibdir'] + '/sisu', } - if FileTest.directory?(sisulib[:sitelib]) # Arch Linux; Debian local + if FileTest.directory?(sisulib[:sitelib]) # local install sisulib[:sitelib] - elsif FileTest.directory?(sisulib[:vendorlib]) # Debian GNU Linux system + elsif FileTest.directory?(sisulib[:vendorlib]) # system install sisulib[:vendorlib] else 'sisu' # assume lib paths work end |