Skip to content

Commit 8817e90

Browse files
committed
Fix current branch not displaying
1 parent 460b70e commit 8817e90

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

tools/arkmanager

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -826,13 +826,25 @@ function checkForUpdate(){
826826

827827
if isUpdateNeeded; then
828828
tput rc; tput ed;
829+
830+
instbeta="$(getCurrentBranch)"
831+
if [ -n "$instbeta" ]; then
832+
echo -e "Branch:" "$GREEN" "$instbeta" "$NORMAL"
833+
fi
834+
829835
echo -e "Current version:" "$RED" "$instver" "$NORMAL"
830836
echo -e "Available version:" "$GREEN" "$bnumber" "$NORMAL"
831837
echo -e "Your server needs to be restarted in order to receive the latest update."
832838
echo -e "Run \"arkmanager update\" to do so"
833839
return 1
834840
else
835841
tput rc; tput ed;
842+
843+
instbeta="$(getCurrentBranch)"
844+
if [ -n "$instbeta" ]; then
845+
echo -e "Branch:" "$GREEN" "$instbeta" "$NORMAL"
846+
fi
847+
836848
echo -e "Current version:" "$GREEN" "$instver" "$NORMAL"
837849
echo -e "Available version:" "$GREEN" "$bnumber" "$NORMAL"
838850

@@ -852,6 +864,7 @@ function checkForUpdate(){
852864
function isUpdateNeeded(){
853865
instver="$(getCurrentVersion)"
854866
bnumber="$(getAvailableVersion)"
867+
855868
if [[ -z "$bnumber" ]]; then
856869
echo "Unable to retrieve update Build ID"
857870
return 2
@@ -915,16 +928,16 @@ function getStagingVersion(){
915928
#
916929
function getCurrentBranch(){
917930
if [ -f "${arkserverroot}/steamapps/appmanifest_${appid}.acf" ]; then
918-
while read -r name val; do if [ "${name}" == "{" ]; then parseSteamACF ".UserConfig" "betakey"; break; fi; done <"${arkserverroot}/steamapps/appmanifest_${appid}.acf"
931+
while read -r name val; do if [ "${name}" == "{" ]; then parseSteamACF ".UserConfig" "BetaKey"; break; fi; done <"${arkserverroot}/steamapps/appmanifest_${appid}.acf"
919932
fi
920933
}
921934

922935
#
923936
# Return the installed beta / branch in staging directory
924937
#
925-
function getCurrentBranch(){
938+
function getStagingBranch(){
926939
if [ -f "${arkStagingDir}/steamapps/appmanifest_${appid}.acf" ]; then
927-
while read -r name val; do if [ "${name}" == "{" ]; then parseSteamACF ".UserConfig" "betakey"; break; fi; done <"${arkStagingDir}/steamapps/appmanifest_${appid}.acf"
940+
while read -r name val; do if [ "${name}" == "{" ]; then parseSteamACF ".UserConfig" "BetaKey"; break; fi; done <"${arkStagingDir}/steamapps/appmanifest_${appid}.acf"
928941
fi
929942
}
930943

0 commit comments

Comments
 (0)