scripts/selector in rvm-0.0.59 vs scripts/selector in rvm-0.0.60
- old
+ new
@@ -74,31 +74,30 @@
;;
ruby-enterprise|ree)
rvm_ruby_interpreter=ree
rvm_ruby_version=${rvm_ruby_version:-"$(__rvm_db "ree_version")"}
- rvm_ruby_patch_level="${rvm_ruby_revision:-"$(__rvm_db "ree_${rvm_ruby_version}_patch_level")"}"
+ if [ "$rvm_ruby_version" != "head" ] ; then
+ rvm_ruby_patch_level="${rvm_ruby_patch_level:-$(__rvm_db "${rvm_ruby_interpreter}_${rvm_ruby_version}_patch_level")}"
+ fi
rvm_ruby_package_name="ree-$rvm_ruby_version-$rvm_ruby_patch_level"
rvm_ruby_package_file="ruby-enterprise-$rvm_ruby_version-$rvm_ruby_patch_level"
if [ -z "$(echo $rvm_ruby_version | awk '/^1\.8/')" ] ; then
__rvm_log "fail" "Unknown Ruby Enterprise Edition version: $rvm_ruby_version"
fi
;;
ruby)
if [ ! -z "$rvm_ruby_tag" ] ; then
rvm_ruby_version=$(echo $rvm_ruby_tag | sed 's/^v//' | sed 's/\///' | awk -F'_' '{print 1 "." $2 "." $3 }')
- rvm_ruby_patch_level=$rvm_ruby_tag # $(echo $rvm_ruby_tag | sed 's/^v//' | sed 's/\///' | awk -F'_' '{print $4 }')
+ # rvm_ruby_patch_level=$rvm_ruby_tag # $(echo $rvm_ruby_tag | sed 's/^v//' | sed 's/\///' | awk -F'_' '{print $4 }')
+ if [ -z "$rvm_ruby_patch_level" ] ; then rvm_ruby_patch_level=$rvm_Ruby_tag ; fi
fi
- if [ -z "$rvm_ruby_version" ] ; then
- rvm_ruby_version=$(__rvm_db "ruby_version") # Default verison is 1.8.6
- fi
- rvm_ruby_patch_level=${rvm_ruby_patch_level:-$(__rvm_db "ruby_${rvm_ruby_version}_patch_level")} # Default verison is 1.8.6
- if [ -z "rvm_ruby_patch_level" ] ; then unset rvm_ruby_patch_level ; fi
- if [ -z "rvm_ruby_version" ] ; then
- __rvm_log "fail" "Unknown ruby version: $rvm_ruby_version"
- fi
+ if [ -z "$rvm_ruby_version" ] ; then rvm_ruby_version=$(__rvm_db "ruby_version") ; fi
+ if [ -z "$rvm_ruby_patch_level" ] ; then rvm_ruby_patch_level="$(__rvm_db "ruby_${rvm_ruby_version/ /}_patch_level")" ; fi
+ if [ -z "$rvm_ruby_patch_level" ] ; then unset rvm_ruby_patch_level ; fi
+ if [ -z "$rvm_ruby_version" ] ; then __rvm_log "fail" "Unknown ruby version: $rvm_ruby_version" ; fi
;;
default|system|current|user)
#no-op?
;;
@@ -255,15 +254,26 @@
ruby_string=$(echo "$rvm_ruby_string" | awk -F'%' '{print $1}')
__rvm_unset_ruby_variables
rvm_ruby_interpreter=$(echo $ruby_string | awk -F'-' '{print $1}')
rvm_ruby_version=$(echo $ruby_string | awk -F'-' '{print $2}')
+ if [ "$rvm_ruby_version" != "head" ] ; then
+ patch_level=$(echo $ruby_string | awk -F'-' '{print $3}')
+ if [ ! -z "$patch_level" ] ; then rvm_ruby_patch_level="$patch_level" ; fi
+ else
+ rvm_ruby_patch_level="head"
+ fi
+
if [ ! -z "$(echo $rvm_ruby_interpreter | awk '/^1\.[8-9]/')" ] ; then
rvm_ruby_patch_level=$rvm_ruby_version
rvm_ruby_version=$rvm_ruby_interpreter
rvm_ruby_interpreter="ruby"
if [ -z "$rvm_ruby_patch_level" ] ; then
- rvm_ruby_patch_level="${rvm_ruby_patch_level:-$(__rvm_db "${rvm_ruby_interpreter}_${rvm_ruby_version}_patch_level")}"
+ if [ "$rvm_ruby_version" != "head" ] ; then
+ rvm_ruby_patch_level="$(__rvm_db "${rvm_ruby_interpreter}_${rvm_ruby_version}_patch_level")"
+ else
+ rvm_ruby_patch_level="head"
+ fi
fi
elif [ ! -z "$(echo $rvm_ruby_interpreter | awk '/^1\.[3-4]/')" ] ; then
rvm_ruby_version=$rvm_ruby_interpreter
rvm_ruby_interpreter=jruby
unset rvm_ruby_patch_level