Explorar o código

resolves bug with appinfo.vdi fix

suggestion by @sergey-k1
should of been ${HOME} not ${rootdir}
see issue #474
Daniel Gibbs %!s(int64=10) %!d(string=hai) anos
pai
achega
23f73547c2
Modificáronse 1 ficheiros con 4 adicións e 5 borrados
  1. 4 5
      functions/fn_update_check

+ 4 - 5
functions/fn_update_check

@@ -113,13 +113,12 @@ sleep 1
 # Gets currentbuild
 currentbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\  -f3)
 
-# Gets availablebuild info
-cd "${rootdir}/steamcmd"
-
 # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD
 
-if [ -f "${rootdir}/Steam/appcache/appinfo.vdf" ]; then
-	rm -f "${rootdir}/Steam/appcache/appinfo.vdf"
+# Gets availablebuild info
+cd "${rootdir}/steamcmd"
+if [ -f "${HOME}/Steam/appcache/appinfo.vdf" ]; then
+	rm -f "${HOME}/Steam/appcache/appinfo.vdf"
 fi
 availablebuild=$(./steamcmd.sh +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +app_info_print "${appid}" +quit | grep -EA 1000 "^\s+\"branches\"$" | grep -EA 5 "^\s+\"public\"$" | grep -m 1 -EB 10 "^\s+}$" | grep -E "^\s+\"buildid\"\s+" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\  -f3)
 if [ -z "${availablebuild}" ]; then