scripts/selector in rvm-0.0.60 vs scripts/selector in rvm-0.0.61
- old
+ new
@@ -86,12 +86,12 @@
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_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 }')
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") ; 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
@@ -131,11 +131,11 @@
else
if [ "$rvm_ruby_interpreter" != "ree" ] ; then
if [ ! -z "$(echo $rvm_ruby_patch_level | awk '/^[0-9]/')" ] ; then
rvm_ruby_patch_level="p$rvm_ruby_patch_level"
fi
- rvm_ruby_patch_level="$(echo $rvm_ruby_patch_level | sed 's/^pp/p/')" # sanity check, thanks sfpyra
+ 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
@@ -210,11 +210,11 @@
if [ ! -z "$rvm_default_flag" -a "$rvm_ruby_interpreter" != "default" ] ; then
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/')"
+ 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
for variable in RUBY_VERSION GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC ; do
@@ -244,10 +244,10 @@
function __rvm_ruby_string {
if [ "system" = "$rvm_ruby_interpreter" ] ; then
rvm_ruby_string="system"
elif [ ! -z "$rvm_ruby_string" ] ; then
- ruby_string=$(echo "$rvm_ruby_string" | sed 's/ruby-enterprise/ree/g') # dash-antics
+ ruby_string=$(echo "$rvm_ruby_string" | sed 's#ruby-enterprise#ree#g') # dash-antics
if [ ! -z "$(echo "$rvm_ruby_string" | awk -F'%' '{print $2}')" ] ; then
rvm_gem_set_name=$(echo "$rvm_ruby_string" | awk -F'%' '{print $2}')
fi
set +x
ruby_string=$(echo "$rvm_ruby_string" | awk -F'%' '{print $1}')