Remove failing workshop items when downloading mods

This commit is contained in:
Ben Peddell 2016-10-08 18:35:54 +10:00
parent bfd3c0e4f5
commit fe1594bcd0
2 changed files with 7 additions and 1 deletions

View File

@ -237,6 +237,7 @@ appid="${appid:-376030}"
mod_appid="${mod_appid:-346110}"
install_bindir="${install_bindir:-${0%/*}}"
install_libexecdir="${install_libexecdir:-${install_bindir%/*}/libexec/arkmanager}"
steamcmd_workshoplog="${steamcmd_workshoplog:-${HOME}/Steam/logs/workshop_log.txt}"
if [ "$steamcmd_user" == "--me" ]; then
install_datadir="${install_datadir:-${HOME}/.share/local/arkmanager}"
@ -1787,7 +1788,11 @@ doDownloadMod(){
break
else
echo
if [ ! -d "$moddldir" ]; then
failedmod="$(sed -n 's|.* Download item \([0-9]*\) result : \(.*\)|\1\t\2|p' "${steamcmd_workshoplog}" | grep -v ' OK' | tail -n1 | cut -f1)"
if [[ -n "$failedmod" && "$failedmod" != "$modid" ]]; then
echo "Mod $failedmod prevented mod update - removing failed mod"
doRemoveMods "$failedmod"
elif [ ! -d "$moddldir" ]; then
echo "Mod $modid download failed"
break
fi

View File

@ -8,6 +8,7 @@ steamcmdroot="/home/steam/steamcmd" # path of yo
steamcmdexec="steamcmd.sh" # name of steamcmd executable
steamcmd_user="steam" # name of the system user who own steamcmd folder
steamcmd_appinfocache="/home/steam/Steam/appcache/appinfo.vdf" # cache of the appinfo command
steamcmd_workshoplog="/home/steam/Steam/logs/workshop_log.txt" # Steam workshop log
#steamlogin="anonymous" # Uncomment this to specify steam login instead of using anonymous login
# config environment