scripts/selector in rvm-0.0.53 vs scripts/selector in rvm-0.0.54

- old
+ new

@@ -41,22 +41,30 @@ rbx|rubinius) rvm_ruby_version="head" unset rvm_ruby_patch_level rvm_ruby_interpreter="rubinius" - rvm_ruby_repo_url=`__rvm_db "rubinius_repo_url"` + rvm_ruby_repo_url=${rvm_rbx_repo_url:-`__rvm_db "rubinius_repo_url"`} rvm_url=$rvm_ruby_repo_url rvm_ruby_configure="" rvm_ruby_make="build" rvm_ruby_make_install="" #rvm_ruby_rev="head" ;; jruby) rvm_ruby_version="${rvm_ruby_version:-`__rvm_db "jruby_version"`}" + rvm_jruby_repo_url="${rvm_jruby_repo_url:-"git://kenai.com/jruby~main"}" + if [ ! -z "$(echo $rvm_ruby_version | awk '/^1.4/')" ] ; then + rvm_ruby_version="1.4.0RC1" + rvm_package_file="$rvm_ruby_interpreter-bin-${rvm_ruby_version}" + else + rvm_package_file="$rvm_ruby_interpreter-bin-$rvm_ruby_version" + fi + rvm_url="http://dist.codehaus.org/$rvm_ruby_interpreter/$rvm_ruby_version/$rvm_package_file.tar.gz" unset rvm_ruby_patch_level - if [ -z "$(echo $rvm_ruby_version | awk '/^1\.2\.0/')" -a -z "$(echo $rvm_ruby_version | awk '/^1\.3\.[0-3]/')" ] ; then + if [ -z "$(echo $rvm_ruby_version | awk '/^1\.[2-4]/')" ] ; then __rvm_log "fail" "Unknown jRuby version: $rvm_ruby_version" fi alias jruby_ng="jruby --ng" alias jruby_ng_server="jruby --ng-server" ;; @@ -107,10 +115,19 @@ else rvm_ruby_patch_level="$rvm_ruby_rev" fi fi + if [ -z "$rvm_gem_set_name" ] ; then + gemset=$(gem env gemdir | xargs basename | sed "s/${rvm_ruby_version}-//") + if [ "$gemset" != "$rvm_ruby_version" ] ; then + rvm_gem_set_name="$gemset" + else + unset rvm_gem_set_name + fi ; unset gemset + fi + if [ ! -z "$rvm_ruby_interpreter" -a ! -z "$rvm_ruby_version" -a "$rvm_ruby_interpreter" != "system" ] ; then rvm_major_version=$(echo $rvm_ruby_version | awk -F'.' '{ print $2 }') rvm_minor_version=$(echo $rvm_ruby_version | awk -F'.' '{ print $3 }') if [ -z "$rvm_gem_set_name" ] ; then @@ -137,15 +154,15 @@ rvm_ruby_patch_level="`echo $rvm_ruby_patch_level | sed 's/^pp/p/'`" # sanity check, thanks sfpyra fi rvm_ruby_package_name="${rvm_ruby_package_name:-"$rvm_ruby_interpreter-$rvm_ruby_version-$rvm_ruby_patch_level"}" rvm_ruby_home="${rvm_ruby_home:-"$rvm_path/$rvm_ruby_interpreter-$rvm_ruby_version-$rvm_ruby_patch_level"}" fi + rvm_ruby_string="$rvm_ruby_package_name" rvm_ruby_log_path="$rvm_log_path/$rvm_ruby_package_name" - rvm_ruby_src_path="$rvm_source_path/$rvm_ruby_package_name" + rvm_ruby_src_path="$rvm_source_path/$rvm_ruby_string" rvm_ruby_binary="$rvm_ruby_home/bin/ruby" rvm_ruby_irbrc="$rvm_ruby_home/.irbrc" - rvm_ruby_string="$rvm_ruby_package_name" rvm_selected=1 export rvm_ruby_interpreter rvm_ruby_version rvm_ruby_repo_url rvm_ruby_package_name rvm_url rvm_ruby_patch_level rvm_ruby_configure rvm_ruby_make rvm_ruby_make_install rvm_ruby_rev rvm_ruby_tag rvm_major_version rvm_minor_version rvm_gem_set_name rvm_gem_path rvm_gem_home rvm_path rvm_source_path rvm_bin_path rvm_ruby_binary rvm_ruby_home rvm_log_path rvm_ruby_log_path rvm_source_path rvm_ruby_src_path rvm_ruby_irbrc rvm_selected rvm_ruby_string else rvm_gem_home=$GEM_HOME @@ -171,13 +188,11 @@ fi elif [ "$rvm_ruby_interpreter" = "system" ] ; then unset GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION IRBRC - PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -) PATH=$rvm_bin_path:$PATH ; export PATH - if [ -s $rvm_path/system ] ; then grep "^MY_RUBY_HOME='$rvm_path" "$rvm_path/system" > /dev/null if [ $? -eq 0 ] ; then rm -f $rvm_path/system # 'system' should *not* point to an rvm ruby. else