From 0acfb80f91b76cf30abd7bcc489dc628577816f6 Mon Sep 17 00:00:00 2001 From: Adam Reece Date: Fri, 10 Sep 2021 19:16:41 +0100 Subject: [PATCH] Model filter: Copy (or link) both files individually to ensure that their destination name is correct. (E.g. "filtered/filtered.mdl" instead of "filtered/helmet.mdl". Model folder needs to be made on Linux, not linked. https://github.com/Adambean/svencoop-custom-res-bouncer/issues/2 --- deploy.cmd | 3 ++- deploy.sh | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/deploy.cmd b/deploy.cmd index 4100722..696b243 100644 --- a/deploy.cmd +++ b/deploy.cmd @@ -179,7 +179,8 @@ IF EXIST "!FILTER_PLAYER_MODELS_FILE_PATHNAME!" ( MD "!FILTER_PLAYER_MODEL_ADDON_DIR_PATHNAME!" ) - COPY /V /Y "!REPLACEMENT_PLAYER_MODEL_DIR_PATHNAME!\"* "!FILTER_PLAYER_MODEL_ADDON_DIR_PATHNAME!" 1>NUL + COPY /V /Y "!REPLACEMENT_PLAYER_MODEL_DIR_PATHNAME!\!REPLACEMENT_PLAYER_MODEL_NAME!.mdl" "!FILTER_PLAYER_MODEL_ADDON_DIR_PATHNAME!\%%L.mdl" 1>NUL + COPY /V /Y "!REPLACEMENT_PLAYER_MODEL_DIR_PATHNAME!\!REPLACEMENT_PLAYER_MODEL_NAME!.bmp" "!FILTER_PLAYER_MODEL_ADDON_DIR_PATHNAME!\%%L.bmp" 1>NUL ECHO - Filter installed. diff --git a/deploy.sh b/deploy.sh index 0089b3c..37daab3 100644 --- a/deploy.sh +++ b/deploy.sh @@ -171,16 +171,16 @@ if [ -f "${FILTER_PLAYER_MODELS_FILE_PATHNAME}" ]; then rm -rf "${FILTER_PLAYER_MODEL_DOWNLOADS_DIR_PATHNAME}" fi - if [ "${PLATFORM}" == "Windows" ]; then - if [ ! -d "${FILTER_PLAYER_MODEL_ADDON_DIR_PATHNAME}" ]; then - mkdir -p "${FILTER_PLAYER_MODEL_ADDON_DIR_PATHNAME}" - fi + if [ ! -d "${FILTER_PLAYER_MODEL_ADDON_DIR_PATHNAME}" ]; then + mkdir -p "${FILTER_PLAYER_MODEL_ADDON_DIR_PATHNAME}" + fi - find "${REPLACEMENT_PLAYER_MODEL_DIR_PATHNAME}" -type f | sort | while read REPLACEMENT_PLAYER_MODEL_FILE_PATHNAME; do - cp "${REPLACEMENT_PLAYER_MODEL_FILE_PATHNAME}" "${FILTER_PLAYER_MODEL_ADDON_DIR_PATHNAME}/" - done + if [ "${PLATFORM}" == "Windows" ]; then + cp "${REPLACEMENT_PLAYER_MODEL_DIR_PATHNAME}/${REPLACEMENT_PLAYER_MODEL_NAME}.mdl" "${FILTER_PLAYER_MODEL_ADDON_DIR_PATHNAME}/${FILTER_PLAYER_MODEL_NAME}.mdl" + cp "${REPLACEMENT_PLAYER_MODEL_DIR_PATHNAME}/${REPLACEMENT_PLAYER_MODEL_NAME}.bmp" "${FILTER_PLAYER_MODEL_ADDON_DIR_PATHNAME}/${FILTER_PLAYER_MODEL_NAME}.bmp" else - ln -s "${REPLACEMENT_PLAYER_MODEL_FILE_PATHNAME}" "${FILTER_PLAYER_MODEL_ADDON_DIR_PATHNAME}" + ln -s "${REPLACEMENT_PLAYER_MODEL_DIR_PATHNAME}/${REPLACEMENT_PLAYER_MODEL_NAME}.mdl" "${FILTER_PLAYER_MODEL_ADDON_DIR_PATHNAME}/${FILTER_PLAYER_MODEL_NAME}.mdl" + ln -s "${REPLACEMENT_PLAYER_MODEL_DIR_PATHNAME}/${REPLACEMENT_PLAYER_MODEL_NAME}.bmp" "${FILTER_PLAYER_MODEL_ADDON_DIR_PATHNAME}/${FILTER_PLAYER_MODEL_NAME}.bmp" fi printf " - Filter installed.\n"