Add --no-download option to update

This commit is contained in:
Ben Peddell 2016-06-06 07:54:47 +10:00
parent cb22f09df2
commit eb99bb7391

View File

@ -1166,6 +1166,7 @@ doUpdate() {
local modupdate=
local saveworld=
local downloadonly=
local nodownload=
for arg in "$@"; do
if [ "$arg" == "--force" ]; then
@ -1189,6 +1190,8 @@ doUpdate() {
arkStagingDir="${ark#--stagingdir=}"
elif [ "$arg" == "--downloadonly" ]; then
downloadonly=1
elif [ "$arg" == "--no-download" ]; then
nodownload=1
else
echo "Unrecognized option $arg"
echo "Try 'arkmanager -h' or 'arkmanager --help' for more information."
@ -1213,8 +1216,10 @@ doUpdate() {
rm -f "${arkserverroot}/.ark-update.lock.$$"
if [ -n "$modupdate" ]; then
if ! doDownloadAllMods; then
modupdate=
if [ -z "$nodownload" ]; then
if ! doDownloadAllMods; then
modupdate=
fi
fi
if ! isAnyModUpdateNeeded; then
modupdate=
@ -1244,12 +1249,14 @@ doUpdate() {
rm -rf "$arkStagingDir/ShooterGame/Saved/"*
fi
echo -n "Downloading ARK update"
cd "$steamcmdroot"
runSteamCMDAppUpdate "$arkStagingDir" $validate
if [ -d "${arkStagingDir}/steamapps/downloading/${appid}" ]; then
echo "Update download interrupted"
return 1
if [ -z "$nodownload" ]; then
echo -n "Downloading ARK update"
cd "$steamcmdroot"
runSteamCMDAppUpdate "$arkStagingDir" $validate
if [ -d "${arkStagingDir}/steamapps/downloading/${appid}" ]; then
echo "Update download interrupted"
return 1
fi
fi
fi
fi