improve ircspam
authorRudolf Polzer <divverent@alientrap.org>
Sat, 17 Jul 2010 13:40:04 +0000 (15:40 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 17 Jul 2010 13:40:04 +0000 (15:40 +0200)
misc/tools/xonotic-map-compiler-autobuild

index 0febde3..212d0a9 100755 (executable)
@@ -130,10 +130,13 @@ buildthemap()
                ../../../misc/tools/xonotic-map-compiler "$M" `grep ^- "$M.map.options" | cut -d '#' -f 1` 2>&1 | tee "$M.log"
        )
        status=$?
-       zip -9r "$bspdir/$M-$blobhash.pk3" "maps/$M.bsp" "maps/$M.log" "maps/$M/" "maps/$M.lin" "gfx/${M}_mini.tga"
+       if [ -n "$IRCSPAM" ]; then
+               cat "maps/$M.log" | log2spam "$M" "$url$M-$blobhash.pk3" "$REFNAME" "$HASH" "$status" > "maps/$M.irc"
+       fi
+       zip -9r "$bspdir/$M-$blobhash.pk3" "maps/$M.bsp" "maps/$M.log" "maps/$M.irc" "maps/$M/" "maps/$M.lin" "gfx/${M}_mini.tga"
        ln -snf "../$M-$blobhash.pk3" "$bspdir/latest/$M.pk3" # from ALL branches, so beware!
        if [ -n "$IRCSPAM" ]; then
-               cat "maps/$M.log" | log2spam "$M" "$url$M-$blobhash.pk3" "$REFNAME" "$HASH" "$status" | $IRCSPAM
+               $IRCSPAM < "maps/$M.irc"
        fi
 }