From dc36e1817c06b812ae655b8355ffa31668af02e0 Mon Sep 17 00:00:00 2001 From: Daniel Ceregatti Date: Sat, 22 Jun 2024 13:11:24 -0700 Subject: [PATCH] Fix Namalsk map integration, as it has two sets of mpmissions directories. --- files/bin/map.sh | 5 +++-- files/mods/2289456201/map.env | 9 ++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/files/bin/map.sh b/files/bin/map.sh index 7b53124..39d71f0 100755 --- a/files/bin/map.sh +++ b/files/bin/map.sh @@ -32,6 +32,7 @@ then else git clone "${REPO}" fi - rm -rf "${SERVER_FILES}/mpmissions/${MPDIR}" - cp -a "${DIR}/${MPDIR}" "${SERVER_FILES}/mpmissions" + rm -rf ${SERVER_FILES}/mpmissions/${MPDIR:?} + pushd "${DIR}" > /dev/null + find . -name "${MPDIR}" -exec cp -a {} "${SERVER_FILES}/mpmissions" \; fi diff --git a/files/mods/2289456201/map.env b/files/mods/2289456201/map.env index 0b0aebb..ff47da2 100644 --- a/files/mods/2289456201/map.env +++ b/files/mods/2289456201/map.env @@ -2,7 +2,10 @@ set -eE +# There are two sets of mpmission files for Namalsk, one for the regular version and one for the hardcore version. +# This is why there is a wildcard in MPDIR. + MAP="Namalsk" -DIR="Namalsk-Server/Mission Files" -REPO="https://github.com/SumrakDZN/Namalsk-Server.git" -MPDIR="hardcore.namalsk" +DIR="Namalsk-Server" +REPO="https://github.com/SumrakDZN/${DIR}.git" +MPDIR="*.namalsk"