mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-21 06:18:28 +00:00
Improve netinstall argument handling
This commit is contained in:
parent
a59c01c9b7
commit
c8f2920296
@ -7,28 +7,31 @@
|
|||||||
arkstGithubRepo="FezVrasta/ark-server-tools"
|
arkstGithubRepo="FezVrasta/ark-server-tools"
|
||||||
|
|
||||||
steamcmd_user="$1"
|
steamcmd_user="$1"
|
||||||
channel=${2:-master} # if defined by 2nd argument install the defined version, otherwise install master
|
|
||||||
shift
|
|
||||||
shift
|
shift
|
||||||
|
|
||||||
|
args=()
|
||||||
output=/dev/null
|
output=/dev/null
|
||||||
|
|
||||||
if [ "$1" = "--verbose" ]; then
|
|
||||||
output=/dev/fd/1
|
|
||||||
shift
|
|
||||||
elif [[ "$1" =~ ^--output= ]]; then
|
|
||||||
output="${1#--output=}"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
|
|
||||||
unstable=
|
unstable=
|
||||||
if [ "$1" = "--unstable" ]; then
|
|
||||||
unstable=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
userinstall=
|
userinstall=
|
||||||
if [ "$1" = "--perform-user-install" ]; then
|
|
||||||
userinstall=yes
|
for arg in "$@"; do
|
||||||
|
case "$arg" in
|
||||||
|
--verbose) output=/dev/fd/1; ;;
|
||||||
|
--output=*) output="${1#--output=}"; ;;
|
||||||
|
--unstable) unstable=1; ;;
|
||||||
|
--perform-user-install) userinstall=yes; ;;
|
||||||
|
*)
|
||||||
|
if [ -n "$channel" ]; then
|
||||||
|
args+="$arg"
|
||||||
|
else
|
||||||
|
channel="$arg"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$channel" ]; then
|
||||||
|
channel="master"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$steamcmd_user" == "--me" && -z "$userinstall" ]]; then
|
if [[ "$steamcmd_user" == "--me" && -z "$userinstall" ]]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user