diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sisu | 25 | ||||
l--------- | bin/sisugem | 1 |
2 files changed, 17 insertions, 9 deletions
@@ -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 |