Don't report update available if steam unreachable

This commit is contained in:
Ben Peddell 2015-10-06 08:27:03 +10:00
parent 9052c46225
commit 0e6dfc2922

View File

@ -311,12 +311,11 @@ function checkForUpdate(){
function isUpdateNeeded(){ function isUpdateNeeded(){
getCurrentVersion getCurrentVersion
getAvailableVersion getAvailableVersion
if [ "$bnumber" -eq "$instver" ]; then if [ "$bnumber" = "Unknown" -o "$bnumber" -eq "$instver" ]; then
return 1 # no update needed return 1 # no update needed
else else
return 0 # update needed return 0 # update needed
fi fi
} }
# #
@ -365,6 +364,9 @@ function getCurrentVersion(){
function getAvailableVersion(){ function getAvailableVersion(){
rm -f "$steamcmd_appinfocache" rm -f "$steamcmd_appinfocache"
bnumber=`$steamcmdroot/$steamcmdexec +@NoPromptForPassword 1 +login ${steamlogin:-anonymous} +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` bnumber=`$steamcmdroot/$steamcmdexec +@NoPromptForPassword 1 +login ${steamlogin:-anonymous} +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`
if [ -z "$bnumber" ]; then
bnumber="Unknown"
fi
return $bnumber return $bnumber
} }