#!/bin/sh

mepwd=$PWD
me=$0
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/vendor_perl:/usr/bin/core_perl

set -e
cd xonotic
./all clean -m -fU -D
# like reclone but do not delete untracked, so q3map2.x86 compile stays
./all compile -r
export DRIVER=soft
#export DRIVERFLAGS="+gl_texturecompression 1 -nofbo"
#export DRIVERFLAGS="+gl_texturecompression 1"

#startx /bin/sh -x ./misc/tools/xonotic-map-compiler-autobuild screenshot -- /usr/bin/Xvfb :7 -screen 0 1024x768x24
sh -x ./misc/tools/xonotic-map-compiler-autobuild screenshot

lwp-request -m GET http://beta.xonotic.org/autobuild-bsp/?d,c >/dev/null
