From ad2f547845c8885db4e5eb0a5d1474c67e14e6fe Mon Sep 17 00:00:00 2001 From: Daniel Ceregatti Date: Thu, 31 Aug 2023 17:05:57 -0700 Subject: [PATCH] Refactor function name so it's different between web and server containers. Fix typo. --- server/bin/dz | 2 +- web/bin/dz | 22 ++++++++-------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/server/bin/dz b/server/bin/dz index 187fe32..54e639a 100755 --- a/server/bin/dz +++ b/server/bin/dz @@ -127,7 +127,7 @@ report() { mergexml(){ # First copy the pristine files from upstream echo "Copying pristine versions of cfgeconomycore.xml and cfgeventspawns.xml..." -`` find /mpmissions -name cfgeconomycore.xml -exec cp -v {} ${SERVER_FILES}{} \; + find /mpmissions -name cfgeconomycore.xml -exec cp -v {} ${SERVER_FILES}{} \; # find /mpmissions -name cfgeventspawns.xml -exec cp {} ${SERVER_FILES}{} \; # Follow https://community.bistudio.com/wiki/DayZ:Central_Economy_mission_files_modding and make a single XML diff --git a/web/bin/dz b/web/bin/dz index 0dcbfcb..38fa907 100755 --- a/web/bin/dz +++ b/web/bin/dz @@ -34,12 +34,6 @@ ${default}" exit 1 } -# "Manage" XML files. -xml(){ - /files/bin/xml.sh ${1} - mergexml ${1} -} - # Manage the mod symlink symlink(){ W=${1} @@ -54,7 +48,7 @@ symlink(){ fi } -mergexml(){ +installxml(){ ID=${1} # Going to have to maintain a matrix of file names -> root node -> child node permutations for i in "CFGEVENTSPAWNS:eventposdef:event" "CFGSPAWNABLETYPES:spawnabletypes:type" "EVENTS:events:event" "TYPES:types:type" @@ -115,18 +109,12 @@ add(){ symlink 1 ${1} "${MODNAME}" # Lower case all the files in mod directories. find "${WORKSHOP_DIR}/${1}" -depth -exec rename -f 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \; - # Copy the key files -# copy_keys 1 ${1} echo -e "Mod id ${1} - ${green}${MODNAME}${default} - added" - mergexml ${ID} -# checkTypesXML ${1} install -# checkInstall ${1} install + installxml ${ID} } # Remove a mod remove(){ -# checkTypesXML ${1} uninstall -# checkInstall ${1} uninstall if [ -d "${WORKSHOP_DIR}/${1}" ] then MODNAME=$(get_mod_name ${1}) @@ -307,6 +295,12 @@ check_mod_install(){ fi } +# "Manage" XML files. +xml(){ + /files/bin/xml.sh ${1} + installxml ${1} +} + # Capture the first argument and shift it off so we can pass $@ to every function C=${1} shift || {