From 848dcf6c2fa40e282b417491cfdaab5d4244b65b Mon Sep 17 00:00:00 2001 From: Ben Peddell Date: Mon, 12 Feb 2018 20:08:29 +1000 Subject: [PATCH] Fix potential update failure when no depots installed --- tools/arkmanager | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/arkmanager b/tools/arkmanager index 6c3805f..c6b1ef5 100755 --- a/tools/arkmanager +++ b/tools/arkmanager @@ -739,11 +739,13 @@ function getSavedArksDirectory(){ # Check if the update manifest matches the current manifest # function checkUpdateManifests(){ - appinfo="$(runSteamCMD +app_info_print "$appid")" + local appinfo="$(runSteamCMD +app_info_print "$appid")" if [ -z "$appbranch" ]; then appbranch="$(getCurrentBranch)" fi + local hasmanifest= while read depot manifest <&3; do + hasmanifest=1 depot="${depot//\"/}" manifest="${manifest//\"/}" newmanifest="$(echo "${appinfo}" | while read name val; do if [ "${name}" == "{" ]; then parseSteamACF ".depots.${depot}.manifests" "${appbranch:-public}"; break; fi; done)" @@ -754,7 +756,11 @@ function checkUpdateManifests(){ return 1 fi done 3< <(sed -n '/^[{]$/,/^[}]$/{/^\t"MountedDepots"$/,/^\t[}]$/{/^\t\t/p}}' "${arkserverroot}/steamapps/appmanifest_${appid}.acf") - return 0 + if [ -z "$hasmanifest" ]; then + return 1 + else + return 0 + fi } #