Fix potential update failure when no depots installed

This commit is contained in:
Ben Peddell 2018-02-12 20:08:29 +10:00
parent adae5f580c
commit 848dcf6c2f

View File

@ -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
}
#