Refactor function name so it's different between web and server containers.

Fix typo.
This commit is contained in:
Daniel Ceregatti 2023-08-31 17:05:57 -07:00
parent d176eadea0
commit ad2f547845
2 changed files with 9 additions and 15 deletions

View file

@ -127,7 +127,7 @@ report() {
mergexml(){ mergexml(){
# First copy the pristine files from upstream # First copy the pristine files from upstream
echo "Copying pristine versions of cfgeconomycore.xml and cfgeventspawns.xml..." 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}{} \; # 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 # Follow https://community.bistudio.com/wiki/DayZ:Central_Economy_mission_files_modding and make a single XML

View file

@ -34,12 +34,6 @@ ${default}"
exit 1 exit 1
} }
# "Manage" XML files.
xml(){
/files/bin/xml.sh ${1}
mergexml ${1}
}
# Manage the mod symlink # Manage the mod symlink
symlink(){ symlink(){
W=${1} W=${1}
@ -54,7 +48,7 @@ symlink(){
fi fi
} }
mergexml(){ installxml(){
ID=${1} ID=${1}
# Going to have to maintain a matrix of file names -> root node -> child node permutations # 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" for i in "CFGEVENTSPAWNS:eventposdef:event" "CFGSPAWNABLETYPES:spawnabletypes:type" "EVENTS:events:event" "TYPES:types:type"
@ -115,18 +109,12 @@ add(){
symlink 1 ${1} "${MODNAME}" symlink 1 ${1} "${MODNAME}"
# Lower case all the files in mod directories. # Lower case all the files in mod directories.
find "${WORKSHOP_DIR}/${1}" -depth -exec rename -f 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \; 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" echo -e "Mod id ${1} - ${green}${MODNAME}${default} - added"
mergexml ${ID} installxml ${ID}
# checkTypesXML ${1} install
# checkInstall ${1} install
} }
# Remove a mod # Remove a mod
remove(){ remove(){
# checkTypesXML ${1} uninstall
# checkInstall ${1} uninstall
if [ -d "${WORKSHOP_DIR}/${1}" ] if [ -d "${WORKSHOP_DIR}/${1}" ]
then then
MODNAME=$(get_mod_name ${1}) MODNAME=$(get_mod_name ${1})
@ -307,6 +295,12 @@ check_mod_install(){
fi 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 # Capture the first argument and shift it off so we can pass $@ to every function
C=${1} C=${1}
shift || { shift || {