Skip to content

Commit 458fec5

Browse files
committed
fix(update): resolve issue with steamcmd update not getting latest build
1 parent 4ec92fc commit 458fec5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lgsm/functions/update_steamcmd.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ fn_update_steamcmd_localbuild(){
4747
# Uses appmanifest to find local build.
4848
localbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3)
4949

50-
# Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD.
51-
if [ -f "${HOME}/.steam/appcache/appinfo.vdf" ]; then
52-
rm -f "${HOME}/.steam/appcache/appinfo.vdf"
53-
fi
54-
5550
# Set branch for updateinfo.
5651
IFS=' ' read -ra branchsplits <<< "${branch}"
5752
if [ "${#branchsplits[@]}" -gt 1 ]; then
@@ -76,6 +71,12 @@ fn_update_steamcmd_remotebuild(){
7671
if [ -d "${steamcmddir}" ]; then
7772
cd "${steamcmddir}" || exit
7873
fi
74+
75+
# Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD.
76+
if [ "$(find "${HOME}" -type f -name "appinfo.vdf" | wc -l)" -ne "0" ]; then
77+
find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \;
78+
fi
79+
7980
remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed '1,/branches/d' | sed "1,/${branchname}/d" | grep -m 1 buildid | tr -cd '[:digit:]')
8081
if [ "${installer}" != "1" ]; then
8182
fn_print_dots "Checking remote build: ${remotelocation}"

0 commit comments

Comments
 (0)