scripts/migrate in rvm-1.0.2 vs scripts/migrate in rvm-1.0.3

- old
+ new

@@ -5,11 +5,10 @@ source "$rvm_scripts_path/base" usage() { echo "Usage: rvm migrate from to" >&2 echo "Moves all gemsets from one ruby to another." >&2 - exit 1 } confirm() { printf "$1 (Y/n): " local confirmation_response @@ -104,11 +103,16 @@ echo "Successfully migrated $expanded_source to $expanded_destination" } -if [[ -z "$1" || "$#" != 2 ]]; then - usage +args=($*) +source_ruby="${args[0]}" +destination_ruby="${args[1]}" +args="$(echo ${args[@]:2}) " # Strip trailing / leading / extra spacing. + +if [[ -z "$source_ruby" || -z "$destination_ruby" ]]; then + usage ; exit 1 fi source_ruby="$1"; shift destination_ruby="$1"; shift