mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-12 02:48:27 +00:00
Fix a couple of errors in isModUpdateAvailable
This commit is contained in:
parent
60465a178a
commit
4a2699bf2e
@ -1747,7 +1747,9 @@ getModIds(){
|
||||
# Checks if a mod update is available before trying to download it
|
||||
isModUpdateAvailable(){
|
||||
local modid="$1"
|
||||
if [ ! -f "$steamcmdroot/steamapps/workshop/appworkshop_${mod_appid}.acf" ]; then return 0; fi
|
||||
local instmft="$(sed -n '/^\t"WorkshopItemsInstalled"$/,/^\t[}]$/{/^\t\t"'"${modid}"'"$/,/^\t\t[}]$/{s|^\t\t\t"manifest"\t\t"\(.*\)"$|\1|p}}' <"$steamcmdroot/steamapps/workshop/appworkshop_${mod_appid}.acf")"
|
||||
if [ -z "$instmft" ]; then return 0; fi
|
||||
local remmft="$(curl -s -d "itemcount=1&publishedfileids[0]=${modid}" http://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/v1 | sed -n 's|^[[:space:]]*"hcontent_file": "\(.*\)",|\1|p')"
|
||||
if [[ -n "${remmft}" && "${instmft}" != "${remmft}" ]]; then
|
||||
return 0 # true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user