forked from p15670423/monkey
Build: Make --install and --uninstall mutually exclusive
This commit is contained in:
parent
ed58ca6950
commit
6d50814c19
|
@ -99,6 +99,7 @@ exit_if_missing_argument() {
|
|||
}
|
||||
|
||||
do_uninstall=false
|
||||
do_install=false
|
||||
username=""
|
||||
|
||||
while (( "$#" )); do
|
||||
|
@ -109,6 +110,7 @@ while (( "$#" )); do
|
|||
shift 2
|
||||
;;
|
||||
--install)
|
||||
do_install=true
|
||||
shift
|
||||
;;
|
||||
--uninstall)
|
||||
|
@ -137,6 +139,11 @@ if [ -z "${APPIMAGE}" ] ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if $do_install && $do_uninstall ; then
|
||||
echo "The --install and --uninstall flags are mutually exclusive."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if $do_uninstall ; then
|
||||
uninstall_service
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue