scripts/upgrade in rvm-1.0.7 vs scripts/upgrade in rvm-1.0.8
- old
+ new
@@ -2,12 +2,23 @@
unset GREP_OPTIONS
source "$rvm_path/scripts/base"
usage() {
- echo "Usage: rvm upgrade prefix [specific version]" >&2
- echo "Upgrades the latest installed ruby with a given prefix (e.g. ree) to a new version." >&2
+ printf "
+
+ Usage:
+
+ rvm upgrade prefix [ruby-string]
+
+ Description:
+
+ Upgrades the latest installed ruby with a given ruby string
+ (e.g. ree) to the latest known version.
+
+" >&2
+
exit 1
}
confirm() {
@@ -53,17 +64,19 @@
[[ -z "$expanded_source" ]] && die_with_error "The source ruby was not a valid ruby string."
confirm "Are you sure you wish to upgrade from $expanded_source to $expanded_destination?" || die_with_error "Cancelling upgrade."
- if [[ ! -d "$rvm_rubies_path/$expanded_destination" ]]; then
+ if [[ ! -d "$rvm_path/rubies/$expanded_destination" ]]; then
"$rvm_path/scripts/log" "info" \
"Installing new ruby $expanded_destination"
- $rvm_bin_path/rvm install "$expanded_destination"
+ "${rvm_bin_path:-"$rvm_path/bin"}/rvm" install "$expanded_destination"
- result="$?" ; [[ "$result" -gt 0 ]] && die_with_error "Unable to install ruby $expanded_destination. Please install it manually to continue." "$result"
+ result="$?"
+
+ [[ "$result" -gt 0 ]] && die_with_error "Unable to install ruby $expanded_destination. Please install it manually to continue." "$result"
fi
"$rvm_path/scripts/log" "info" \
"Migrating gems from $expanded_source to $expanded_destination"