Command line options

This commit is contained in:
Ryhon 2022-03-05 20:40:01 +01:00 committed by GitHub
parent 30d63f0a11
commit bb31f09977
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -8,7 +8,17 @@ cd "$(dirname "$0")" || exit $?
# change to true to skip opening a terminal
# This isn't recommended since you won't see errors, warnings, and update alerts.
SKIP_TERMINAL=${SKIP_TERMINAL:=false}
OPTS=`getopt -o St --long skip-terminal,terminal -n 'parse-options' -- "$@"`
while true; do
case "$1" in
-S | --skip-terminal ) SKIP_TERMINAL=true; shift ;;
-t | --terminal ) SKIP_TERMINAL=false; shift ;;
-- ) shift; break ;;
* ) break ;;
esac
done
${SKIP_TERMINAL:=false}
##########