Build: Make --install and --uninstall mutually exclusive

This commit is contained in:
Mike Salvatore 2022-05-05 09:29:46 -04:00
parent ed58ca6950
commit 6d50814c19
1 changed files with 7 additions and 0 deletions

View File

@ -99,6 +99,7 @@ exit_if_missing_argument() {
} }
do_uninstall=false do_uninstall=false
do_install=false
username="" username=""
while (( "$#" )); do while (( "$#" )); do
@ -109,6 +110,7 @@ while (( "$#" )); do
shift 2 shift 2
;; ;;
--install) --install)
do_install=true
shift shift
;; ;;
--uninstall) --uninstall)
@ -137,6 +139,11 @@ if [ -z "${APPIMAGE}" ] ; then
exit 1 exit 1
fi fi
if $do_install && $do_uninstall ; then
echo "The --install and --uninstall flags are mutually exclusive."
exit 1
fi
if $do_uninstall ; then if $do_uninstall ; then
uninstall_service uninstall_service
exit 0 exit 0