bash/rvm in rvm-0.0.18 vs bash/rvm in rvm-0.0.19
- old
+ new
@@ -1,11 +1,11 @@
#!/bin/bash
rvm_author="Wayne E. Seguin"
rvm_author_email="wayneeseguin@gmail.com"
-rvm_website="http://github.com/wayneeseguin/rvm"
-rvm_version="0.0.18"
+rvm_website="http://rvm.beginrescueend.com/"
+rvm_version="0.0.19"
rvm_updated="2009.08.25"
#
# License: See LICENSE
#
@@ -224,10 +224,14 @@
done
}
function rvm-install-ruby {
+ local ruby_options
+ ruby_options=RUBYOPT
+ unset RUBYOPT
+
case "$implementation" in
ree)
version=${version-1.8.6}
patchlevel=${patchlevel-20090610}
@@ -322,10 +326,14 @@
;;
*) rvm-log-fail "Ruby implementation '$implementation' is not known."
esac
+ if [ ! -z $ruby_options ] ; then
+ RUBYOPT="$ruby_options" ; export RUBYOPT
+ fi
+
}
function rvm-uninstall {
implementation="${1-$implementation}"
@@ -391,10 +399,11 @@
case "$implementation" in
default)
rm -f $install_path/current
source $install_path/default
+ unset GEM_HOME MY_RUBY_HOME
PATH="$default_path" ; export PATH
;;
jruby)
version="${version-1.3.1}"
@@ -479,10 +488,21 @@
rvm-log-fail "Your shell is not supported bash and zsh are currently supported."
fi
}
+function rvm-symlinks {
+ mkdir -p ${install_path}/bin
+ for release in `ls $install_path | grep 'ruby-'` ; do
+ for binary in ruby irb gem rdoc ri erb ; do
+ if [ -x $install_path/$release/bin/$binary ] ; then
+ ln -fs $install_path/$release/bin/$binary $install_path/bin/$binary-${release#ruby-}
+ fi
+ done
+ done
+}
+
function rvm-list {
echo -e "\nruby:"
ls -l $install_path/ | awk '/ ruby-[1-2].*/ { print " - " $NF }'
echo
@@ -650,11 +670,11 @@
done
while [ $# -gt 0 ] ; do
token="$1" ; shift
case "$token" in
- install|uninstall|use|path|info|setup|version|srcdir|list|reset|debug|gemdup)
+ install|uninstall|use|path|info|setup|version|srcdir|list|symlinks|reset|debug)
action=$token
;;
ruby|jruby|ree|default|all)
implementation="$token"
@@ -671,10 +691,24 @@
fi
implementation="${implementation-current}"
;;
+ gemdup)
+ action=$token
+ if [ -z "$1" ] ; then
+ implementaiton="default"
+ elif [ "$1" = "system" ] ; then
+ implementation=$1 ; shift
+ elif [ "$1" = "default" ] ; then
+ implementation=$1 ; shift
+ else
+ implementation=$1 ; shift
+ version=$2 ; shift
+ fi
+ ;;
+
1.8|1.8.6|1.8.7|1.9|1.9.1|1.9.2|1.2.0|1.3.1)
version="$token"
action="${action-use}"
;;
@@ -781,9 +815,10 @@
list) rvm-list ;;
gemdir) rvm-gem-dir $implementation $version $patchlevel ;;
srcdir) rvm-src-dir $implementation $version $patchlevel ;;
gemdup) rvm-gem-dup $implementation $version $patchlevel ;;
info) rvm-info $implementation $version $patchlevel ;;
+ symlinks) rvm-symlinks ;;
version) rvm-version ;;
reset) rvm-reset ;;
debug)
rvm-version
rvm-info