scripts/selector in rvm-0.0.98 vs scripts/selector in rvm-0.0.99

- old
+ new

@@ -267,32 +267,32 @@ rm -f $rvm_symlink_path/$binary ln -nfs $rvm_ruby_home/bin/$binary $rvm_symlink_path/$binary rm -f $rvm_symlink_path/passenger_ruby ln -nfs $rvm_bin_path/$rvm_ruby_string $rvm_symlink_path/passenger_ruby done + fi + + if [[ "system" = "$rvm_ruby_interpreter" ]] ; then + rm -f $rvm_path/default + rm -f $rvm_path/bin/default* else - if [[ "system" = "$rvm_ruby_interpreter" ]] ; then - rm -f $rvm_path/default - rm -f $rvm_path/bin/default* - else - RUBY_VERSION="$($MY_RUBY_HOME/bin/ruby -v | sed 's#^\(.*\) (.*$#\1#')" - export GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION + RUBY_VERSION="$($MY_RUBY_HOME/bin/ruby -v | sed 's#^\(.*\) (.*$#\1#')" + export GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION - echo "PATH=$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_path/bin:\$PATH ; export PATH" > $rvm_path/default + echo "PATH=$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_path/bin:\$PATH ; export PATH" > $rvm_path/default - for variable in RUBY_VERSION GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC rvm_ruby_string rvm_gem_set_name; do - eval "export $variable" - eval value=\$${variable} - if [[ ! -z "$value" ]] ; then - echo "${variable}='$value' ; export ${variable}" >> $rvm_path/default - else - echo "unset ${variable}" >> $rvm_path/default - fi - done ; unset variable value + for variable in RUBY_VERSION GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC rvm_ruby_string rvm_gem_set_name; do + eval "export $variable" + eval value=\$${variable} + if [[ ! -z "$value" ]] ; then + echo "${variable}='$value' ; export ${variable}" >> $rvm_path/default + else + echo "unset ${variable}" >> $rvm_path/default + fi + done ; unset variable value - if [[ ! -z "$rvm_default_flag" ]] ; then $rvm_scripts_path/symlink "default" ; fi - fi + if [[ ! -z "$rvm_default_flag" ]] ; then $rvm_scripts_path/symlink "default" ; fi fi fi unset rvm_default_flag if [[ ! -z "$rvm_symlink_name" ]] ; then $rvm_scripts_path/symlink "$rvm_symlink_name" ; unset rvm_symlink_name ; fi @@ -305,10 +305,10 @@ if [[ ! -z "$new_path" ]] ; then export PATH="$new_path" ; unset new_path fi - __rvm_hook "after_use" + $rvm_scripts_path/hook "after_use" } __rvm_ruby_string() { # rvm_ruby_string may designate any of the following items: # * rvm_gem_set_name