mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-11 18:48:26 +00:00
Add checkmodupdate command
This commit is contained in:
parent
23a58e953d
commit
586a688a0c
@ -274,6 +274,9 @@ instances.
|
||||
`checkupdate`::
|
||||
Checks if an ARK server update is available
|
||||
|
||||
`checkmodupdate`::
|
||||
Checks if any mods need updating on the server
|
||||
|
||||
`installmods`::
|
||||
Installs all mods specified in the instance config into the
|
||||
`ShooterGame/Content/Mods` directory
|
||||
|
||||
@ -1924,6 +1924,26 @@ doUpdate() {
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Check if any mod update is available
|
||||
#
|
||||
checkForModUpdate(){
|
||||
local updateavail=
|
||||
|
||||
for modid in $(getModIds); do
|
||||
if isModUpdateAvailable $modid || isModUpdateNeeded $modid; then
|
||||
printf "Mod %d [%s] update needed\n" "$modid" "$(getModName $modid)"
|
||||
updateavail=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$updateavail" ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Get the Mod IDs of the installed mods and the requested mods
|
||||
#
|
||||
@ -3102,6 +3122,9 @@ main(){
|
||||
checkupdate)
|
||||
checkForUpdate
|
||||
;;
|
||||
checkmodupdate)
|
||||
checkForModUpdate
|
||||
;;
|
||||
installmod)
|
||||
doInstallMod "${args[@]}"
|
||||
;;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user