scripts/repair in rvm-1.0.2 vs scripts/repair in rvm-1.0.3
- old
+ new
@@ -48,15 +48,18 @@
repair_archives
repair_environments
"$rvm_scripts_path/log" "info" "All items repaired."
}
-if [[ -z "$1" ]]; then
- usage
- exit $?
+args=($*)
+action="${args[0]}"
+args="$(echo ${args[@]:1}) " # Strip trailing / leading / extra spacing.
+
+if [[ -z "$action" ]]; then
+ usage ; exit $?
fi
-case "$1" in
+case "$action" in
all) repair_all ;;
symlinks) repair_symlinks ;;
environments) repair_environments ;;
archives) repair_archives;;
*) usage ;;