diff --git a/README.asciidoc b/README.asciidoc index 2bfc774..e474363 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -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 diff --git a/tools/arkmanager b/tools/arkmanager index 5ef4537..e3e6d8e 100755 --- a/tools/arkmanager +++ b/tools/arkmanager @@ -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[@]}" ;;