--- /dev/null
+#!/bin/sh
+
+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
+
+set -e
+cd xonotic-map-compiler
+./all clean -m -fU -D
+# like reclone but do not delete untracked, so q3map2.x86 compile stays
+make -C netradiant install/q3map2.x86
+./misc/tools/xonotic-map-compiler-autobuild build
--- /dev/null
+#!/bin/sh
+
+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
+
+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
+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
+deltime=$(($now - 86400))
+while IFS=' ' read -r d f; do
+ if [ $d -lt $now ]; then
+ rm -f "$f"
+ else
+ echo "$d $f"
+ done
+done < .to_delete > .to_delete_new
+mv .to_delete_new .to_delete
--- /dev/null
+#!/bin/sh
+
+# is being run as cronjob, better set PATH
+export PATH=/home/xonotic-build/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
+
+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
+
+set -ex
+export HOSTS_THAT_ARE_MYSELF="xonotic-build-win32 xonotic-build-win64"
+export HOSTS_THAT_ARE_DISABLED=""
+ssh xonotic-beta '
+ cd autobuild/;
+ s0=`date -d "now - 7 days - 12 hours" +%s`;
+ s00=`date -d "now - 60 days - 12 hours" +%s`;
+ for X in *; do
+ [ -f "$X" ] || continue;
+ d=${X#Xonotic-};
+ d=${d%%[_-.]*};
+ [ x"$d" != x"latest" ] || continue;
+ w=`date -d $d +%w`;
+ s=`date -d $d +%s`;
+ if [ "$w" -ne 0 -a "$s" -lt "$s0" -o "$s" -lt "$s00" ]; then
+ rm -f "$X";
+ fi;
+ done
+'
+cd ~/xonotic-release-build
+./all clean --reclone
+./all each git checkout HEAD^0
+# add all feature branches we want
+
+# map branches that we include:
+# winners in the poll for upcoming CTF maps
+# maps near completion
+
+for b in \
+ origin/fruitiex/space_elevator \
+ origin/fruitiex/dance \
+ origin/fruitiex/runningmanctf \
+ origin/mintox/geoplanetary
+do
+ b=$b ./all each sh -c 'if git rev-parse $b >/dev/null 2>&1; then git merge $b; fi'
+done
+./all update -N
+d0=`date +%Y%m%d`
+d=$d0
+i=1
+while HEAD http://xonotic:g-23@beta.xonotic.org/autobuild/"Xonotic-$d.zip"; do
+ i=$(($i+1))
+ d="$d0"_"$i"
+done
+RELEASETYPE=beta RELEASEDATE=$d ./all release
+for X in Xonotic-$d*.zip; do
+ ln -snf "$X" "Xonotic-latest${X#Xonotic-$d}"
+done
+rsync -vaSHP Xonotic*.zip xonotic-beta:autobuild/
+echo "Finished a new beta build at http://beta.xonotic.org/autobuild/" | $IRCSPAM
+cd