#!/bin/bash set -e if [ -e /etc/systemd/system/soldat.service ]; then systemctl stop soldat fi # Install dependencies sudo apt-get -y install build-essential g++ cmake git fpc libprotobuf-dev protobuf-compiler libssl-dev libsdl2-dev libopenal-dev libphysfs-dev libfreetype6 # Install BZFlag builddir=${TMPDIR:-/tmp}/soldat-build mkdir -p ${builddir} cd ${builddir} if [ -d soldat ]; then rm -rf soldat fi git clone https://github.com/Soldat/soldat.git git clone https://github.com/Soldat/base.git cd soldat mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=/opt/soldat .. make make install mkdir -p /opt/soldat/bin/configs cp -r ${builddir}/base/server/configs/bots /opt/soldat/bin/configs/bots if ! [ -L /usr/games/soldatserver ]; then ln -s /opt/soldat/bin/soldatserver /usr/games/ fi rm -rf ${builddir} cat > /opt/soldat/bin/configs/server.cfg < /opt/soldat/bin/configs/mapslist.txt < /etc/systemd/system/soldat.service <