mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-16 12:28:27 +00:00
Retry mod download after steamcmd timeouts
This commit is contained in:
parent
2ef86c9028
commit
5c5cd58e34
@ -450,11 +450,20 @@ doSafeUpdate(){
|
||||
#
|
||||
doInstallMod(){
|
||||
local modid=$1
|
||||
cd "$steamcmdroot"
|
||||
./$steamcmdexec +login anonymous +workshop_download_item $mod_appid $modid +quit
|
||||
|
||||
local modsrcdir="$steamcmdroot/steamapps/workshop/content/$mod_appid/$modid"
|
||||
local moddldir="$steamcmdroot/steamapps/workshop/downloads/$mod_appid/$modid"
|
||||
local moddestdir="$arkserverroot/ShooterGame/Content/Mods/$modid"
|
||||
local dlsize=0
|
||||
cd "$steamcmdroot"
|
||||
|
||||
while true; do
|
||||
./$steamcmdexec +login anonymous +workshop_download_item $mod_appid $modid +quit
|
||||
if [ ! -d "$moddldir" ]; then break; fi
|
||||
local newsize="`du -s "$moddldir" | cut -f1`"
|
||||
if [ $newsize -eq $dlsize ]; then break; fi
|
||||
dlsize=$newsize
|
||||
done
|
||||
|
||||
if [ -f "$modsrcdir/mod.info" ]; then
|
||||
echo "Mod $modid downloaded"
|
||||
echo "Copying files to $moddestdir"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user