Add gdb to the container.

Rework how mods are installed with various global scripts and env files instead of individual files for every mod.
Deal with different types file variants.
Add Pripyat support.
This commit is contained in:
Daniel Ceregatti 2023-03-30 10:17:16 -07:00
parent f5048372d8
commit 38e4434bd5
9 changed files with 49 additions and 35 deletions

View file

@ -13,9 +13,9 @@ RUN echo 'deb http://deb.debian.org/debian bullseye-backports main non-free' >>
# Install _only_ the necessary packages
RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \
nano \
curl \
ca-certificates \
gdb \
git \
jq \
lib32gcc-s1 \
@ -26,6 +26,7 @@ RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-reco
libcap2 \
libxml2-utils \
locales \
nano \
procps \
python3-pip \
wget \

View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -eE
MAP="Banov"
DIR="Banov"
REPO="https://github.com/KubeloLive/${DIR}.git"
MPDIR="empty.banov"

View file

@ -1,30 +0,0 @@
#!/usr/bin/env bash
set -eE
cd "$(dirname ${0})"
echo
if echo ${0} | grep -q "uninstall.sh"
then
echo "Backing up, as uninstalling will remove the Banov mpmissions directory"
dayzserver backup
echo "Uninstalling mpmissions..."
echo
rm -rf ${HOME}/serverfiles/mpmissions/empty.banov
elif echo ${0} | grep -q "update.sh"
then
echo "Updating mpmissions directory..."
echo
cd /tmp
git clone https://github.com/KubeloLive/Banov 2> /dev/null 1> /dev/null
cp -a Banov/empty.banov ${HOME}/serverfiles/mpmissions
rm -rf Banov
else
echo "Installing mpmissions files..."
echo
cd /tmp
git clone https://github.com/KubeloLive/Banov 2> /dev/null 1> /dev/null
cp -a Banov/empty.banov ${HOME}/serverfiles/mpmissions
rm -rf Banov
fi

View file

@ -1 +0,0 @@
install.sh

View file

@ -1 +0,0 @@
install.sh

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
MAP="Pripyat"
DIR="PripyatMissionFiles"
REPO="https://github.com/FrenchiestFry15/${DIR}.git"
MPDIR="serverMission.Pripyat"

1
files/mods/@Pripyat Symbolic link
View file

@ -0,0 +1 @@
2929038098

30
files/mods/install.sh Executable file
View file

@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -eEx
source /files/mods/${1}/install.env
echo
if echo ${0} | grep -q "uninstall.sh"
then
echo "Backing up, as uninstalling will remove the ${MAP} mpmissions directory"
dayzserver backup
echo "Uninstalling mpmissions..."
echo
rm -rf ${HOME}/serverfiles/mpmissions/${MPDIR}
elif echo ${0} | grep -q "update.sh"
then
echo "Updating mpmissions directory..."
echo
cd /tmp
git clone ${REPO} 2> /dev/null 1> /dev/null
cp -a ${DIR}/${MPDIR} ${HOME}/serverfiles/mpmissions
rm -rf ${DIR}
else
echo "Installing mpmissions files..."
echo
cd /tmp
git clone ${REPO} 2> /dev/null 1> /dev/null
cp -a ${DIR}/${MPDIR} ${HOME}/serverfiles/mpmissions
rm -rf ${DIR}
fi

View file

@ -31,7 +31,7 @@ do
else
# Add the contents of extras/types.xml to every db/types.xml in all
# mission directories
xmllint --noout ${TYPES_FILE} && {
xmllint --noout ${TYPES_FILE} 2> /dev/null && {
echo -e "${green}${TYPES_FILE} passes XML lint test!"
echo -e "Merging to $file...${default}"
# Chop the bottom tag from the destination file
@ -43,7 +43,7 @@ do
# Concatenate the two files back into the source file
cat /tmp/types-dst.xml /tmp/types-src.xml > /tmp/types.xml
xmllint --noout /tmp/types.xml && {
xmllint --noout /tmp/types.xml 2> /dev/null && {
cp -v /tmp/types.xml ${file}
} || {
# Try again, but chop the top 3 tags, hopefully xml and types, from the source file...