+ commithash=$1
+ shift
+ for F in `git show "${commithash}:maps/"`; do
+ case "$F" in
+ *.map.options)
+ ;;
+ *)
+ continue
+ ;;
+ esac
+ M=${F%.map.options}
+ blobhash=`git rev-parse --revs-only "${commithash}:maps/$M.map.options" || true`-`git rev-parse --revs-only "${commithash}:maps/$M.map" || true`
+ case "$blobhash" in
+ -*)
+ ;;
+ *-)
+ ;;
+ *)
+ "$@" "$M" "$blobhash" "$commithash"
+ ;;
+ esac
+ done
+}
+
+pre2spam()
+{
+ map=$1
+ url=$2
+ branch=$3
+ hash=$4
+
+ branch=${branch##refs/heads/}
+ branch=${branch##refs/remotes/}
+ branch=${branch##origin/}
+ hash=`echo "$hash" | cut -c 1-7`
+
+ echo "[$branch $hash] starting map compile of $map"
+}
+
+ss2spam()
+{
+ map=$1
+ url=$2
+ branch=$3
+ hash=$4
+ status=$5
+
+ branch=${branch##refs/heads/}
+ branch=${branch##refs/remotes/}
+ branch=${branch##origin/}
+ hash=`echo "$hash" | cut -c 1-7`
+
+ s_error=
+
+ if [ "$status" -ne 0 ]; then
+ s_error="exited with status $status"
+ fi
+
+ if [ -n "$s_error" ]; then
+ echo "[$branch $hash] \ 34screenshots of $map could not be made: $s_error"
+ else
+ echo "[$branch $hash] screenshots of $map are available on $url"
+ fi
+}
+
+log2spam()
+{
+ map=$1
+ url=$2
+ branch=$3
+ hash=$4
+ status=$5
+ time=$6
+
+ hash=`echo "$hash" | cut -c 1-7`
+
+ branch=${branch##refs/heads/}
+ branch=${branch##refs/remotes/}
+ branch=${branch##origin/}
+
+ s_samplesize=
+ s_failshaders=
+ s_leaked=
+ s_error=
+
+ if [ "$status" -ne 0 ]; then
+ s_error="exited with status $status"
+ fi
+ while IFS= read -r L; do
+ case "$L" in
+ WARNING:\ surface\ at\ *\ too\ large\ for\ desired\ samplesize*)
+ s=${L##* }
+ if [ -z "$s_samplesize" ] || [ "$s" -gt "$s_samplesize" ]; then
+ s_samplesize=$s
+ fi
+ ;;
+ WARNING:\ Couldn\'t\ find\ image\ for\ shader\ textures/NULL)
+ # radiant stupid
+ ;;
+ WARNING:\ Couldn\'t\ find\ image\ for\ shader\ *)
+ s_failshaders="$s_failshaders ${L##* }"
+ ;;
+ '******* leaked *******')
+ s_leaked=1
+ ;;
+ '************ ERROR ************')
+ IFS= read -r s_error
+ ;;
+ esac