Make BZflag script more robust

This commit is contained in:
DeathByDenim 2022-02-06 13:04:33 -05:00
parent ebc98dce72
commit 36121c82ae
1 changed files with 8 additions and 1 deletions

View File

@ -1,16 +1,23 @@
#!/bin/bash
set -e
if [ -e /etc/systemd/system/bzflag.service ]; then
systemctl stop bzflag
fi
# Install BZFlag
mkdir -p ${TMPDIR:-/tmp}/bzflag-build
cd ${TMPDIR:-/tmp}/bzflag-build
if [ -d bzflag ]; then
rm -rf bzflag
fi
git clone --branch ${bzflag_version} https://github.com/BZFlag-Dev/bzflag.git
cd bzflag
./autogen.sh
./configure --disable-client --prefix=/opt/bzflag-${bzflag_version}
make
make install
if [ -L /usr/games/bzfs ]; then
if ! [ -L /usr/games/bzfs ]; then
ln -s /opt/bzflag-2.4/bin/bzfs /usr/games/
fi