Don't loop infinitely if options are misspelled (or invalid).
[invirt/scripts/invirt-admin.git] / invirt-admin
index 3465bea..64b02ee 100755 (executable)
@@ -32,6 +32,11 @@ while [ $# -gt 0 ]; do
        --arch)      arch=$2;      shift 2;;
        --dist)      dist=$2;      shift 2;;
        --mirror)    mirror=$2;    shift 2;;
+        *)
+            echo "Unknown option: $1"
+            echo
+            usage
+            ;;
     esac
 done
 if [ -z "$name" ]; then