This commit is contained in:
parent
725af3fcbd
commit
03a471cd0f
@ -8,6 +8,7 @@ services:
|
||||
STEAM_USER: testo
|
||||
STEAM_PASSWORD: testo
|
||||
WORKSHOP_COLLECTION: 1400118996
|
||||
MOD_EXCLUDE: 667953829,1210050323,925018569,837729515,2041057379
|
||||
volumes:
|
||||
- arma3_dev_game:/home/steam/server
|
||||
- arma3_dev_mods:/home/steam/volumes/mods
|
||||
|
@ -51,18 +51,23 @@ mkdir -p "$MOD_LINK_DIR"
|
||||
rm -f "$MOD_LINK_DIR"/*
|
||||
|
||||
MODS_TO_LOAD=""
|
||||
MOD_EXCLUDE=${MOD_EXCLUDE:=""}
|
||||
|
||||
for mod_id in $(curl -s "https://steamcommunity.com/sharedfiles/filedetails/?id=$WORKSHOP_COLLECTION" | grep -E 'id="sharedfile_[0-9]+"' | sed 's/.*id="sharedfile_\([0-9]\+\)".*/\1/')
|
||||
do
|
||||
# Check if directory exists
|
||||
if [ ! -d "$VOLUME_HOME/mods/$mod_id" ]; then
|
||||
echo "Could not find mod directory for $mod_id"
|
||||
echo "Try to download it first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ln -s "$VOLUME_HOME/mods/$mod_id" "$MOD_LINK_DIR/$mod_id"
|
||||
MODS_TO_LOAD="${MODS_TO_LOAD}mods/${mod_id};"
|
||||
# Check if mod is excluded
|
||||
if [[ "$MOD_EXCLUDE" == *"$mod_id"* ]]; then
|
||||
# Check if directory exists
|
||||
if [ ! -d "$VOLUME_HOME/mods/$mod_id" ]; then
|
||||
echo "Could not find mod directory for $mod_id"
|
||||
echo "Try to download it first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ln -s "$VOLUME_HOME/mods/$mod_id" "$MOD_LINK_DIR/$mod_id"
|
||||
MODS_TO_LOAD="${MODS_TO_LOAD}mods/${mod_id};"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$MODS_TO_LOAD" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user