From 865c5dfcfce842a32974698a09abe749c4f94cf1 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 21 Feb 2012 14:16:16 +0100 Subject: [PATCH] update scripts from hagger --- misc/infrastructure/cat-if-error.sh | 18 ++++++++++ misc/infrastructure/ircspam.pl | 3 ++ .../xonotic-map-screenshot.cron | 33 +++++-------------- 3 files changed, 29 insertions(+), 25 deletions(-) create mode 100755 misc/infrastructure/cat-if-error.sh create mode 100755 misc/infrastructure/ircspam.pl diff --git a/misc/infrastructure/cat-if-error.sh b/misc/infrastructure/cat-if-error.sh new file mode 100755 index 00000000..1789af5d --- /dev/null +++ b/misc/infrastructure/cat-if-error.sh @@ -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 index 00000000..8d742f3d --- /dev/null +++ b/misc/infrastructure/ircspam.pl @@ -0,0 +1,3 @@ +#!/bin/sh + +ssh rpolzer@rm.endoftheinternet.org diff --git a/misc/infrastructure/xonotic-map-screenshot.cron b/misc/infrastructure/xonotic-map-screenshot.cron index 0435c142..688e2662 100755 --- a/misc/infrastructure/xonotic-map-screenshot.cron +++ b/misc/infrastructure/xonotic-map-screenshot.cron @@ -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)