#!/bin/bash set -e ARMA_MOD_VOLUME="arma3_dev_mods" # Check if argument is given if [ -z "$1" ]; then echo "No argument given. Use workshop id as argument. e.g. 1400118996" exit 1 fi PAYLOAD=$(cat < "\$tmpFile" echo "### DOWNLOADING MOD \$mod_id ###" until /home/steam/steamcmd/steamcmd.sh +runscript "\$tmpFile"; do echo -e "###\nLets try that again\n###"; done 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 EOF ) docker run \ -it \ --rm \ --name=arma3_mods \ -v "$ARMA_MOD_VOLUME":/home/steam/mount \ cm2network/steamcmd \ bash -c "$PAYLOAD"