mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-23 15:08:28 +00:00
Move --force argument into doUpdate
This commit is contained in:
parent
22b021b41b
commit
c329f28fee
@ -448,9 +448,21 @@ doInstall() {
|
|||||||
# Stop the server, update it and then start it back.
|
# Stop the server, update it and then start it back.
|
||||||
#
|
#
|
||||||
doUpdate() {
|
doUpdate() {
|
||||||
|
local appupdate=
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ "$arg" == "--force" ]; then
|
||||||
|
appupdate=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
cd "$arkserverroot"
|
cd "$arkserverroot"
|
||||||
|
|
||||||
if isUpdateNeeded; then
|
if isUpdateNeeded; then
|
||||||
|
appupdate=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$appupdate" ]; then
|
||||||
forceUpdate
|
forceUpdate
|
||||||
else
|
else
|
||||||
echo "Your server is already up to date! The most recent version is ${bnumber}."
|
echo "Your server is already up to date! The most recent version is ${bnumber}."
|
||||||
@ -870,7 +882,7 @@ while true; do
|
|||||||
;;
|
;;
|
||||||
update)
|
update)
|
||||||
if [ "$2" == "--force" ]; then
|
if [ "$2" == "--force" ]; then
|
||||||
forceUpdate
|
doUpdate --force
|
||||||
shift
|
shift
|
||||||
elif [ "$2" == "--safe" ]; then
|
elif [ "$2" == "--safe" ]; then
|
||||||
doSafeUpdate
|
doSafeUpdate
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user