--- /dev/null
+#!/bin/sh
+
+logfile=$1
+shift
+
+if ! lockfile-create "$logfile.lock" >/dev/null 2>&1; then
+ exit 1
+fi
+lockfile-touch "$logfile.lock" & lockpid=$!
+
+if "$@" >"$logfile" 2>&1; then
+ : # all is well
+else
+ cat "$logfile"
+fi
+
+kill $lockpid
+lockfile-remove "$logfile.lock"
mepwd=$PWD
me=$0
-if ! lockfile-create "$me"; then
- exit 1
-fi
-lockfile-touch "$me" & lockpid=$!
-trap 'kill $lockpid || true; cd "$mepwd"; lockfile-remove "$me"' EXIT
-trap 'exit 1' INT TERM
+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
-export __GL_FSAA_MODE=8
+./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
-GET http://beta.xonotic.org/autobuild-bsp/ >/dev/null
-cd "$HOME/autobuild-bsp" || exit 1
-now=`date +%s`
-deltime=$(($now + 86400))
-grep -l -- '-->(none)<!--' */index.html | cut -d / -f 1 | while IFS= read -r D; do
- for F in "$D" "$D.pk3" "`echo "$D" | rev | cut -d - -f 3- | rev`-full-`echo "$D" | rev | cut -d - -f 1-2 | rev`.pk3"; do
- echo "$deltime $F" >> .to_delete
- done
-done
-while IFS=' ' read -r d f; do
- if [ $d -lt $now ]; then
- rm -rf "$f"
- else
- echo "$d $f"
- fi
-done < .to_delete > .to_delete_new
-mv .to_delete_new .to_delete
+lwp-request -m GET http://beta.xonotic.org/autobuild-bsp/?d,c >/dev/null