Catch no arguments being passed

This commit is contained in:
Martin Wimpress 2020-08-10 13:07:45 +01:00
parent bae1dedf3a
commit 4aa38ad8f9
No known key found for this signature in database
GPG key ID: 61DF940515E06DA3

View file

@ -554,7 +554,12 @@ QEMU="/snap/bin/qemu-virgil"
QEMU_IMG="/snap/bin/qemu-virgil.qemu-img" QEMU_IMG="/snap/bin/qemu-virgil.qemu-img"
VIRGIL_PATH="/snap/qemu-virgil/current" VIRGIL_PATH="/snap/qemu-virgil/current"
while [ $# -gt 0 ]; do # Take command line arguments
if [ $# -lt 1 ]; then
usage
exit 0
else
while [ $# -gt 0 ]; do
case "${1}" in case "${1}" in
-delete|--delete) -delete|--delete)
DELETE=1 DELETE=1
@ -595,7 +600,8 @@ while [ $# -gt 0 ]; do
echo "ERROR! \"${1}\" is not a supported parameter." echo "ERROR! \"${1}\" is not a supported parameter."
usage;; usage;;
esac esac
done done
fi
if [ -n "$SYSTEM_QEMU" ]; then if [ -n "$SYSTEM_QEMU" ]; then
QEMU=$(which qemu-system-x86_64) QEMU=$(which qemu-system-x86_64)