mirror of
https://ceregatti.org/git/daniel/dayzdockerserver.git
synced 2025-05-06 14:21:18 +00:00
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:
parent
45631496f4
commit
212da43d0a
4 changed files with 18 additions and 3 deletions
|
@ -80,7 +80,7 @@ Install the mpmissions files for the map(s) you plan to run. By default, only Ch
|
||||||
```shell
|
```shell
|
||||||
# Copy Chernarus
|
# Copy Chernarus
|
||||||
cp -a /mpmission/dayzOffline.chernarusplus ${MPMISSIONS}
|
cp -a /mpmission/dayzOffline.chernarusplus ${MPMISSIONS}
|
||||||
# Copy Livonia
|
# And/Or copy Livonia
|
||||||
cp -a /mpmission/dayzOffline.enoch ${MPMISSIONS}
|
cp -a /mpmission/dayzOffline.enoch ${MPMISSIONS}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -12,11 +12,19 @@ source ${FILES}/mods/${ID}/xml.env
|
||||||
# Iterate over the file names we can handle
|
# Iterate over the file names we can handle
|
||||||
for var in CFGEVENTSPAWNS CFGSPAWNABLETYPES EVENTS TYPES
|
for var in CFGEVENTSPAWNS CFGSPAWNABLETYPES EVENTS TYPES
|
||||||
do
|
do
|
||||||
if echo ${!var} | grep -q http
|
DIR="${WORKSHOP_DIR}/${ID}"
|
||||||
|
OUT="${DIR}/${var,,}.xml"
|
||||||
|
if echo ${!var} | grep -qE "^http"
|
||||||
then
|
then
|
||||||
OUT="${WORKSHOP_DIR}/${ID}/${var,,}.xml"
|
|
||||||
echo "${var} is a URL, downloading to ${OUT}"
|
echo "${var} is a URL, downloading to ${OUT}"
|
||||||
curl -so ${OUT} ${!var}
|
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 || {
|
xmllint --noout ${OUT} 2> /dev/null || {
|
||||||
echo -e "${red}${var,,}.xml does not pass XML lint test!${default}"
|
echo -e "${red}${var,,}.xml does not pass XML lint test!${default}"
|
||||||
} && {
|
} && {
|
||||||
|
|
6
files/mods/2971190303/xml.env
Normal file
6
files/mods/2971190303/xml.env
Normal 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
1
files/mods/@DayZBicycle
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
2971190303
|
Loading…
Add table
Reference in a new issue