From 3b67e47cb695752cbf00e75b811c95eb261d4f1a Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Tue, 30 Aug 2022 16:05:41 +0200 Subject: [PATCH] improved mod download script --- downloadMods.sh | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/downloadMods.sh b/downloadMods.sh index ecd5dca..3537b02 100755 --- a/downloadMods.sh +++ b/downloadMods.sh @@ -15,15 +15,15 @@ PAYLOAD=$(cat < "\$tmpFile" - echo "Downloading mod \$mod_id" + echo "### DOWNLOADING MOD \$mod_id ###" until /home/steam/steamcmd/steamcmd.sh +runscript "\$tmpFile"; do echo -e "###\nLets try that again\n###"; done - echo -e "###\nDownload finished\n###" + echo "### DOWNLOAD FINISHED ###" +done + +echo "### FIX CASE ###" + +IFS=\$'\n' +for SRC in \$(find "\$MOD_DIR/" -depth) +do + DST=\$(dirname "\${SRC}")/\$(basename "\${SRC}" | tr '\[A-Z\]' '\[a-z\]') + if [ "\${SRC}" != "\${DST}" ] + then + [ ! -e "\${DST}" ] && mv -vT "\${SRC}" "\${DST}" + fi done -# for f in \$(find /home/steam/mount -type f -name '*.pbo' -o -type f -name '*.bisign'); do mv -v "\$f" "\$(echo \$f | tr '[A-Z]' '[a-z]')"; done EOF )