scripts/selector in rvm-1.1.3 vs scripts/selector in rvm-1.1.4

- old
+ new

@@ -272,10 +272,22 @@ else source "$rvm_path/config/system" fi fi + if [[ ${rvm_default_flag:-0} -eq 1 ]] ; then + + "$rvm_path/scripts/alias" delete default &> /dev/null + + \find "${rvm_bin_path:-"$rvm_path/bin"}" -name 'default_*' -maxdepth 0 -delete + \rm -f "$rvm_path/config/default" + \rm -f "$rvm_path/environments/default" + \rm -rf "$rvm_path/wrappers/default" + + fi + + # Check binaries, remove under the condition they're symlinks. if [[ ${rvm_selfcontained:-1} -eq 0 ]] ; then for binary in ruby gem irb ri rdoc rake erb testrb ; do @@ -375,25 +387,25 @@ "$rvm_path/scripts/wrapper" "$rvm_ruby_string" --no-prefix else "$rvm_path/scripts/wrapper" "$rvm_ruby_string" "default" fi + if [[ "system" != "$rvm_ruby_interpreter" ]] ; then - if [[ "system" = "$rvm_ruby_interpreter" ]] ; then - "$rvm_path/scripts/alias" delete default &> /dev/null - \find "${rvm_bin_path:-"$rvm_path/bin"}" -name 'default_*' -maxdepth 0 -delete - \rm -f "$rvm_path/config/default" - \rm -f "$rvm_path/environments/default" - \rm -rf "$rvm_path/wrappers/default" - - else RUBY_VERSION="$("$rvm_ruby_home/bin/ruby" -v | sed 's#^\(.*\) (.*$#\1#')" + export GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION + "$rvm_path/scripts/alias" delete default &> /dev/null + "$rvm_path/scripts/alias" create default "$environment_id" >& /dev/null + \ln -nfs "$rvm_path/environments/$environment_id" "$rvm_path/environments/default" + \ln -nfs "$rvm_path/wrappers/$environment_id" "$rvm_path/wrappers/default" + fi + fi rvm_default_flag=0 if [[ -n "${rvm_wrapper_name:-""}" ]] ; then