mirror of
https://ceregatti.org/git/daniel/dayzdockerserver.git
synced 2025-05-06 22:31:18 +00:00

Rework directories so there are fewer volumes within volumes. Keep splitting up the code between the two scripts, removing unused variables, etc.. Add XML file merging integration. WIP. Fix lack of comma in cfg file that _might_ have been causing issues...
25 lines
633 B
Bash
Executable file
25 lines
633 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# A generic script to manage merging mod XML files to mpmissions XML files
|
|
|
|
set -eE
|
|
|
|
ID=${1}
|
|
|
|
source ${FILES}/mods/${ID}/xml.env
|
|
|
|
# Iterate over the file names we can handle
|
|
for var in CFGEVENTSPAWNS CFGSPAWNABLETYPES EVENTS TYPES
|
|
do
|
|
if echo ${!var} | grep -q http
|
|
then
|
|
OUT="${WORKSHOP_DIR}/${ID}/${var,,}.xml"
|
|
echo "${var} is a URL, downloading to ${OUT}"
|
|
curl -so ${OUT} ${!var}
|
|
xmllint --noout ${OUT} 2> /dev/null || {
|
|
echo -e "${red}${var,,}.xml does not pass XML lint test!${default}"
|
|
} && {
|
|
echo -e "${green}${var,,}.xml passes XML lint test!${default}"
|
|
}
|
|
fi
|
|
done
|