aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-12-02 23:30:51 -0500
committerRalph Amissah <ralph@amissah.com>2013-12-02 23:30:51 -0500
commitda5e7ffe9b6b76f965d3ec01b4bef0c99b7f1955 (patch)
treee3739fae2390609b557dbec04ec3c6485a3f1b64 /bin
parentv5: xmlns xlink using xl (diff)
v4 v5: rake create build & install sisu gemspec; bin/sisugem (add .gitignore)
* rake gemcbi #(create build install sisu gem) * rake gemspecscreate && \ rake gembuild && \ sudo rake geminstall * rake gemspecscreate && \ gem build sisu5.gemspec && \ sudo gem install --no-rdoc --no-ri \ sisu-5.1.0.gem * bin/sisu updated (modified to take account of gems) * bin/sisugem added * .gitignore sisu-*.gem sisu*.gemspec consider inclusion (& tracking) of rake created sisu4.gemspec sisu5.gemspec (as this makes their availability more obvious) * once gem is installed: "sisu _5.1.0_ -vM" (to see version, commands otherwise as usual) if paths are such that sisu is not available "sisugem _5.1.0_ -vM" should work (as it is installed by gemspec, but not other sisu installers)
Diffstat (limited to 'bin')
-rw-r--r--bin/sisu25
l---------bin/sisugem1
2 files changed, 17 insertions, 9 deletions
diff --git a/bin/sisu b/bin/sisu
index 7dcb09bb..0786500f 100644
--- a/bin/sisu
+++ b/bin/sisu
@@ -54,31 +54,35 @@ WOK
$KCODE='u' if RUBY_VERSION < '1.9'
argv=$*
SiSU_called_from_directory=Dir.pwd
- if $0 !~/\bsisu[45]$/
+ require 'rubygems'
+ check_sisu_stable_ruby_version?
+ if __FILE__ =~/gem/ \
+ and __FILE__ =~/sisu-[45]\.\d+\.\d+/
+ SiSU_version_dir=(__FILE__ =~/sisu-5\.\d+\.\d+/) \
+ ? 'v5'
+ : 'v4'
+ elsif $0 !~/\b(?:sisu[45]|sisugem)$/
SiSU_version_dir=case argv.inspect
when /"(?:--v4)"/
- check_sisu_stable_ruby_version?
'v4'
when /"(?:--v5)"/
- check_sisu_stable_ruby_version?
'v5'
- when /"(?:--dev)"/
- check_sisu_dev_ruby_version?
+ when /"--dev"/
'v5'
else
- check_sisu_stable_ruby_version?
'v4'
end
else
SiSU_version_dir=case $0
when /\bsisu4$/
- check_sisu_stable_ruby_version?
'v4'
when /\bsisu5$/
- check_sisu_stable_ruby_version?
'v5'
+ when /sisugem$/ # should have been caught earlier, unused, debug check
+ SiSU_version_dir=(__FILE__ =~/sisu-5\.\d+\.\d+/) \
+ ? 'v5'
+ : 'v4'
else
- check_sisu_stable_ruby_version?
'v4'
end
end
@@ -158,6 +162,7 @@ rescue
STDERR.puts $!
STDERR.puts $@
require 'rbconfig'
+ require 'rubygems'
e=Config::CONFIG
puts %{
#{%x{ruby -v}.strip.to_s}
@@ -166,6 +171,8 @@ rescue
ruby named: #{e['ruby_version']}
rubylib: #{e['rubylibdir']}
rubylib local: #{e['sitelibdir']}
+ gem dir: #{Gem.dir}
+ gem path: #{Gem.path}
}
system(%{echo "
system RUBYPATH: ${RUBYPATH}
diff --git a/bin/sisugem b/bin/sisugem
new file mode 120000
index 00000000..b4999d51
--- /dev/null
+++ b/bin/sisugem
@@ -0,0 +1 @@
+sisu \ No newline at end of file