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 )