improved mod download script
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f91d8b3580
commit
3b67e47cb6
@ -15,15 +15,15 @@ PAYLOAD=$(cat <<EOF
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
WORKSHOP_DIR="/home/steam/Steam/steamapps/workshop/content"
|
WORKSHOP_DIR="/home/steam/Steam/steamapps/workshop/content"
|
||||||
|
MOD_DIR="\$WORKSHOP_DIR/107410"
|
||||||
|
|
||||||
mkdir -p \$WORKSHOP_DIR
|
mkdir -p \$WORKSHOP_DIR
|
||||||
rm -rf \$WORKSHOP_DIR/content
|
ln -s /home/steam/mount "\$MOD_DIR"
|
||||||
ln -s /home/steam/mount "\$WORKSHOP_DIR/107410"
|
|
||||||
|
|
||||||
echo -n "Username: "
|
echo -n "Username: "
|
||||||
read username
|
read username
|
||||||
|
|
||||||
echo "Perform initial login. Exit after successfull login. To login type login username"
|
echo "Perform initial login."
|
||||||
|
|
||||||
/home/steam/steamcmd/steamcmd.sh +login \$username +quit
|
/home/steam/steamcmd/steamcmd.sh +login \$username +quit
|
||||||
|
|
||||||
@ -40,14 +40,25 @@ do
|
|||||||
echo "quit";
|
echo "quit";
|
||||||
} > "\$tmpFile"
|
} > "\$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
|
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
|
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
|
EOF
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user