also do a pre-compile irc notification for map compiles
authorRudolf Polzer <divVerent@alientrap.org>
Sat, 19 Jun 2010 11:49:40 +0000 (13:49 +0200)
committerRudolf Polzer <divVerent@alientrap.org>
Sat, 19 Jun 2010 11:49:40 +0000 (13:49 +0200)
misc/tools/xonotic-map-compiler-autobuild

index f33fb9dec344d39c6727db78bd9371d69be0bc02..3f411004700a156e7bd8dff47ee7c1b53f524285 100755 (executable)
@@ -23,6 +23,21 @@ allmaps()
        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"
+}
+
 log2spam()
 {
        map=$1
@@ -68,7 +83,7 @@ log2spam()
        s_failshaders=`echo "$s_failshaders" | sed "s, textures/, ,g"`
        s_failshaders=${s_failshaders# }
        if [ -n "$s_error" ]; then
-               echo -n "[$branch] \ 34failed"
+               echo -n "[$branch $hash\ 34failed"
        else
                echo -n "[$branch] finished"
        fi
@@ -103,6 +118,9 @@ buildthemap()
        if [ -f "$bspdir/$M-$blobhash.pk3" ]; then
                continue
        fi
+       if [ -n "$IRCSPAM" ]; then
+               pre2spam "$M" "$url$M-$blobhash.pk3" "$REFNAME" "$HASH" | $IRCSPAM
+       fi
        (
                cd maps
                ../../../misc/tools/xonotic-map-compiler "$M" `head -n 1 "$M.map.options"` 2>&1 | tee "$M.log"