mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-27 16:58:27 +00:00
Read current beta / branch from app manifest
This commit is contained in:
parent
a6089466d2
commit
cbec220639
@ -632,11 +632,32 @@ function getStagingVersion(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Return the installed beta / branch
|
||||||
|
#
|
||||||
|
function getCurrentBranch(){
|
||||||
|
if [ -f "${arkserverroot}/steamapps/appmanifest_${appid}.acf" ]; then
|
||||||
|
while read name val; do if [ "${name}" == "{" ]; then parseSteamACF "UserConfig" "betakey"; break; fi; done <"${arkserverroot}/steamapps/appmanifest_${appid}.acf"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Return the installed beta / branch in staging directory
|
||||||
|
#
|
||||||
|
function getCurrentBranch(){
|
||||||
|
if [ -f "${arkStagingDir}/steamapps/appmanifest_${appid}.acf" ]; then
|
||||||
|
while read name val; do if [ "${name}" == "{" ]; then parseSteamACF "UserConfig" "betakey"; break; fi; done <"${arkStagingDir}/steamapps/appmanifest_${appid}.acf"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Get the current available server version on steamdb
|
# Get the current available server version on steamdb
|
||||||
#
|
#
|
||||||
function getAvailableVersion(){
|
function getAvailableVersion(){
|
||||||
rm -f "$steamcmd_appinfocache"
|
rm -f "$steamcmd_appinfocache"
|
||||||
|
if [ -z "$appbranch" ]; then
|
||||||
|
appbranch="$(getCurrentBranch)"
|
||||||
|
fi
|
||||||
runSteamCMD +app_info_update 1 +app_info_print "$appid" +quit | while read name val; do if [ "${name}" == "{" ]; then parseSteamACF ".depots.branches.${appbranch:-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.${appbranch:-public}" "buildid"; break; fi; done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -736,6 +757,9 @@ function getSavedArksDirectory(){
|
|||||||
#
|
#
|
||||||
function checkUpdateManifests(){
|
function checkUpdateManifests(){
|
||||||
appinfo="$(runSteamCMD +app_info_print "$appid" +quit)"
|
appinfo="$(runSteamCMD +app_info_print "$appid" +quit)"
|
||||||
|
if [ -z "$appbranch" ]; then
|
||||||
|
appbranch="$(getCurrentBranch)"
|
||||||
|
fi
|
||||||
while read depot manifest <&3; do
|
while read depot manifest <&3; do
|
||||||
newmanifest="$(echo "${appinfo}" | while read name val; do if [ "${name}" == "{" ]; then parseSteamACF ".depots.${depot}.manifests" "${appbranch:-public}"; break; fi; done)"
|
newmanifest="$(echo "${appinfo}" | while read name val; do if [ "${name}" == "{" ]; then parseSteamACF ".depots.${depot}.manifests" "${appbranch:-public}"; break; fi; done)"
|
||||||
if [[ -z "${newmanifest}" && "${appbranch:-public}" != "public" ]]; then
|
if [[ -z "${newmanifest}" && "${appbranch:-public}" != "public" ]]; then
|
||||||
@ -2891,7 +2915,11 @@ printStatus(){
|
|||||||
|
|
||||||
instver="$(getCurrentVersion)"
|
instver="$(getCurrentVersion)"
|
||||||
echo -e "$NORMAL" "Server build ID: " "$GREEN" $instver "$NORMAL"
|
echo -e "$NORMAL" "Server build ID: " "$GREEN" $instver "$NORMAL"
|
||||||
if false && [ -f "$arkserverroot/version.txt" ]; then
|
instbeta="$(getCurrentBranch)"
|
||||||
|
if [ -n "$instbeta" ]; then
|
||||||
|
echo -e "$NORMAL" "Server branch: " "$GREEN" "$instbeta" "$NORMAL"
|
||||||
|
fi
|
||||||
|
if [ -f "$arkserverroot/version.txt" ]; then
|
||||||
echo -e "$NORMAL" "Server version: " "$GREEN" "$(<"$arkserverroot/version.txt")" "$NORMAL"
|
echo -e "$NORMAL" "Server version: " "$GREEN" "$(<"$arkserverroot/version.txt")" "$NORMAL"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user