Add support for processing local XML files, as some times mods include them.

Add DayZ Bicycle XML integration.
Update docs.
This commit is contained in:
Daniel Ceregatti 2023-09-05 17:35:17 -07:00
parent 45631496f4
commit 212da43d0a
4 changed files with 18 additions and 3 deletions

View file

@ -80,7 +80,7 @@ Install the mpmissions files for the map(s) you plan to run. By default, only Ch
```shell
# Copy Chernarus
cp -a /mpmission/dayzOffline.chernarusplus ${MPMISSIONS}
# Copy Livonia
# And/Or copy Livonia
cp -a /mpmission/dayzOffline.enoch ${MPMISSIONS}
```

View file

@ -12,11 +12,19 @@ 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
DIR="${WORKSHOP_DIR}/${ID}"
OUT="${DIR}/${var,,}.xml"
if echo ${!var} | grep -qE "^http"
then
OUT="${WORKSHOP_DIR}/${ID}/${var,,}.xml"
echo "${var} is a URL, downloading to ${OUT}"
curl -so ${OUT} ${!var}
elif echo ${!var} | grep -qE "^\./"
then
echo "${var} is local, copying to ${OUT}"
cp -v "${DIR}/${!var}" "${OUT}"
fi
if [ -f ${OUT} ]
then
xmllint --noout ${OUT} 2> /dev/null || {
echo -e "${red}${var,,}.xml does not pass XML lint test!${default}"
} && {

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
CFGSPAWNABLETYPES=./spawnabletypes.xml
CFGEVENTSPAWNS=./cfgeventspawns_chernarus.xml
#EVENTS=events.xml
#TYPES=types.xml

1
files/mods/@DayZBicycle Symbolic link
View file

@ -0,0 +1 @@
2971190303