Fix mod download not being retried

This commit is contained in:
Ben Peddell 2016-05-31 18:46:37 +10:00
parent e8de3826c9
commit cb22f09df2

View File

@ -372,8 +372,8 @@ function runSteamCMDspinner(){
printf "Executing"
printf " %q" "$steamcmdroot/$steamcmdexec" +@NoPromptForPassword 1 +login ${steamlogin:-anonymous} "$@" +quit
printf "\n"
if command >&3; then
runSteamCMD "$@" | tee /dev/fd/3
if (command >&3) 2>/dev/null; then
runSteamCMD "$@" > >(tee /dev/fd/3)
else
runSteamCMD "$@"
fi
@ -1383,7 +1383,8 @@ doDownloadMod(){
while true; do
echo -n "Downloading mod $modid"
local output=$(runSteamCMDspinnerSubst 5 +workshop_download_item $mod_appid $modid)
local output
output=$(runSteamCMDspinnerSubst 5 +workshop_download_item $mod_appid $modid)
result=$?
if [ $result -eq 0 ]; then
modsrcdir="$(echo "$output" | sed -n 's@^Success. Downloaded item [0-9][0-9]* to "\([^"]*\)" .*@\1@p')"