Skip to content

Instantly share code, notes, and snippets.

@ToeiRei
Last active February 25, 2021 22:12
Show Gist options
  • Save ToeiRei/da42564ea9f144b29b2c37c8de7ab413 to your computer and use it in GitHub Desktop.
Save ToeiRei/da42564ea9f144b29b2c37c8de7ab413 to your computer and use it in GitHub Desktop.
Read all arkmods from game.ini and download them
#!/bin/bash
CWD=`pwd`
GAMEID=346110
WORKSHOP=( $(cat Game.ini | grep ModIDS | awk -F'=' '{print $2}') )
cd /home/ark/serverfiles
for i in "${WORKSHOP[@]}"
do
while [[ $result != *"Success"* ]]
do
result=$(Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd.sh +login anonymous +workshop_download_item ${GAMEID} ${i} validate +quit)
if [[ $result == *"ERROR"* ]]; then
echo "Error downloading mod ${i}."
else
echo "Mod ${i} successfully downloaded."
fi
done
result="ERROR"
done
cd ${CWD}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment