bin/sisu , install name check (stable & git versions)
authorRalph Amissah <ralph@amissah.com>
Sun, 17 May 2015 04:17:15 +0000 (00:17 -0400)
committerRalph Amissah <ralph@amissah.com>
Sun, 17 May 2015 15:07:26 +0000 (11:07 -0400)
bin/sisu
data/doc/sisu/CHANGELOG_v7

index 6b18e5929d804e758534fb2f339bf71bdded84de..011c1f4f3df8b1b708b345200b983d212beca270 100755 (executable)
--- a/bin/sisu
+++ b/bin/sisu
@@ -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
@@ -114,13 +114,7 @@ class Orient
     end
   end
   def sisu_this_lib
-    if processing.sisu_runtime_path =~/\/gems\// \
-    and processing.sisu_runtime_path \
-    =~ /\/sisu-(?:\d+|[a-z])\.(?:\d+|[a-z])\.(?:\d+|[a-z])\//
-      # gem sought
-      processing.sisu_runtime_path.
-        gsub(/\/bin\/sisu[a-z0-7_-]*$/,'/lib/sisu')
-    elsif (processing.called_as \
+    if (processing.called_as \
     !~ /^#{RbConfig::CONFIG['bindir']}\/sisu$/)
       # called off file system, project directory tree
       File.expand_path(processing.called_as).
@@ -128,12 +122,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
index ffc33cb0d2841b4fba4bee5ac76e030e359bbf05..81d2763624221e6378cd966492c907731648318d 100644 (file)
@@ -23,6 +23,8 @@ Reverse Chronological:
 * 7.1.1.orig.tar.xz (Open commit window: 2015-05-17; Pre-Release))
   http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/sisu_7.1.1
 
+  * bin/sisu, install name check (stable & git versions)
+
 * sisu_7.1.0.orig.tar.xz (2015-05-15:19/5)
   http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/sisu_7.1.0