Last active
February 25, 2021 22:12
-
-
Save ToeiRei/da42564ea9f144b29b2c37c8de7ab413 to your computer and use it in GitHub Desktop.
Read all arkmods from game.ini and download them
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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