#!/bin/ash
apk add rsync --no-cache
mkdir -p /mnt/server
cd /mnt/server
wget -O xonotic.zip http://dl.xonotic.org/xonotic-${VERSION}.zip
unzip -o xonotic.zip
mv Xonotic/* ./
./misc/tools/rsync-updater/update-to-autobuild.sh -y
mkdir -p .xonotic/data
cp -n server/server.cfg .xonotic/data/server.cfg || true
rm -rf COPYING Makefile *glx* *glx *sdl* *sdl *linux32* *exe *.app *.sh bin* GPL* Docs/ gmqcc/ source/ misc/ Xonotic/ xonotic.zip
echo "-----------------------------------------"
echo "Installation completed..."
echo "-----------------------------------------"