dayzdockerserver/files/mods/install.sh
Daniel Ceregatti 38e4434bd5 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.
2023-03-30 10:17:16 -07:00

30 lines
692 B
Bash
Executable file

#!/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