summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyhon <ryhon0@gmail.com>2022-03-05 20:40:01 +0100
committerGitHub <noreply@github.com>2022-03-05 20:40:01 +0100
commitbb31f09977dfd687d0817f7e6bc57ad54a630df8 (patch)
tree0bcb31ad573e106e25d1196997f289f9953d7fc7
parent30d63f0a1170ca9b3690f010fcf72e7c1e73f9d1 (diff)
downloadSMAPI-bb31f09977dfd687d0817f7e6bc57ad54a630df8.tar.gz
SMAPI-bb31f09977dfd687d0817f7e6bc57ad54a630df8.tar.bz2
SMAPI-bb31f09977dfd687d0817f7e6bc57ad54a630df8.zip
Command line options
-rw-r--r--src/SMAPI.Installer/assets/unix-launcher.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/SMAPI.Installer/assets/unix-launcher.sh b/src/SMAPI.Installer/assets/unix-launcher.sh
index 6ab61df6..6e8d4df3 100644
--- a/src/SMAPI.Installer/assets/unix-launcher.sh
+++ b/src/SMAPI.Installer/assets/unix-launcher.sh
@@ -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}
##########