Add error handling for subcommands

This commit is contained in:
Joey Hafner 2023-10-10 14:24:09 -07:00
parent c3b24aa9da
commit f51c0a2c3a

View File

@ -63,6 +63,7 @@ function main {
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
case $1 in case $1 in
-f|--force-recreate) FORCE_RECREATE=true; shift;; -f|--force-recreate) FORCE_RECREATE=true; shift;;
*) echo "Unrecognized option '$1'"; exit 1;;
esac esac
done done
;; ;;
@ -70,6 +71,7 @@ function main {
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
case $1 in case $1 in
-o|--remove-orphans) REMOVE_ORPHANS=true; shift;; -o|--remove-orphans) REMOVE_ORPHANS=true; shift;;
*) echo "Unrecognized option '$1'"; exit 1;;
esac esac
done done
;; ;;