mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-23 15:08:28 +00:00
Check if depot manifests have changed
This commit is contained in:
parent
6f244a02fa
commit
567f899725
@ -546,6 +546,9 @@ function isUpdateNeeded(){
|
|||||||
bnumber="$(getAvailableVersion)"
|
bnumber="$(getAvailableVersion)"
|
||||||
if [[ -z "$bnumber" || "$bnumber" -eq "$instver" ]]; then
|
if [[ -z "$bnumber" || "$bnumber" -eq "$instver" ]]; then
|
||||||
return 1 # no update needed
|
return 1 # no update needed
|
||||||
|
elif checkUpdateManifests; then
|
||||||
|
echo "Build ID changed but manifests have not changed"
|
||||||
|
return 1
|
||||||
else
|
else
|
||||||
return 0 # update needed
|
return 0 # update needed
|
||||||
fi
|
fi
|
||||||
@ -604,6 +607,20 @@ function getAvailableVersion(){
|
|||||||
runSteamCMD +app_info_update 1 +app_info_print "$appid" +quit | while read name val; do if [ "${name}" == "{" ]; then parseSteamACF ".depots.branches.public" "buildid"; break; fi; done
|
runSteamCMD +app_info_update 1 +app_info_print "$appid" +quit | while read name val; do if [ "${name}" == "{" ]; then parseSteamACF ".depots.branches.public" "buildid"; break; fi; done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if the update manifest matches the current manifest
|
||||||
|
#
|
||||||
|
function checkUpdateManifests(){
|
||||||
|
appinfo="$(runSteamCMD +app_info_print "$appid" +quit)"
|
||||||
|
while read depot manifest <&3; do
|
||||||
|
newmanifest="$(echo "${appinfo}" | while read name val; do if [ "${name}" == "{" ]; then parseSteamACF ".depots.${depot}.manifests" "public"; break; fi; done)"
|
||||||
|
if [ "${newmanifest}" != "${manifest}" ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
done 3< <(sed -n '/^[{]$/,/^[}]$/{/^\t"MountedDepots"$/,/^\t[}]$/{/^\t\t/p}}' "${arkserverroot}/steamapps/appmanifest_${appid}.acf")
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Get the PID of the server process
|
# Get the PID of the server process
|
||||||
#
|
#
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user