Compare commits

..

2 Commits

Author SHA1 Message Date
3b67e47cb6 improved mod download script
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-30 16:05:41 +02:00
f91d8b3580 link mission dir 2022-08-30 16:05:20 +02:00
2 changed files with 23 additions and 6 deletions

View File

@@ -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
) )

View File

@@ -69,6 +69,12 @@ if [ -n "$MODS_TO_LOAD" ]; then
SERVER_ARGS="${SERVER_ARGS} -mod=${MODS_TO_LOAD::-1}" SERVER_ARGS="${SERVER_ARGS} -mod=${MODS_TO_LOAD::-1}"
fi fi
#
# LINK MISSIONS
#
rm -r /home/steam/server/mpmissions
ln -s "$VOLUME_HOME/missions" "/home/steam/server/mpmissions"
# SERVER_ARGS="${SERVER_ARGS} -serverMod=${SERVER_MODS}" # SERVER_ARGS="${SERVER_ARGS} -serverMod=${SERVER_MODS}"