]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
update scripts from hagger
authorRudolf Polzer <divverent@alientrap.org>
Tue, 21 Feb 2012 13:16:16 +0000 (14:16 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 21 Feb 2012 13:16:16 +0000 (14:16 +0100)
misc/infrastructure/cat-if-error.sh [new file with mode: 0755]
misc/infrastructure/ircspam.pl [new file with mode: 0755]
misc/infrastructure/xonotic-map-screenshot.cron

diff --git a/misc/infrastructure/cat-if-error.sh b/misc/infrastructure/cat-if-error.sh
new file mode 100755 (executable)
index 0000000..1789af5
--- /dev/null
@@ -0,0 +1,18 @@
+#!/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"
diff --git a/misc/infrastructure/ircspam.pl b/misc/infrastructure/ircspam.pl
new file mode 100755 (executable)
index 0000000..8d742f3
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+ssh rpolzer@rm.endoftheinternet.org
index 0435c1426d1d5db913391aa054626d7794acdac6..688e266236351e9cc927d8488382b43770f0fb8a 100755 (executable)
@@ -2,35 +2,18 @@
 
 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