]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/xonotic-map-compiler-autobuild
in .options files, change syntax to allow settings on different lines. Syntax rules...
[xonotic/xonotic.git] / misc / tools / xonotic-map-compiler-autobuild
index 5e0115a960ef3b8da541ef197ee8c42a28698bf0..6405eb2b1fe7fc62e6f56cdfedddd898cce96729 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,9 +118,12 @@ 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"
+               ../../../misc/tools/xonotic-map-compiler "$M" `grep ^- "$M.map.options" | cut -d '#' -f 1` 2>&1 | tee "$M.log"
        )
        zip -9r "$bspdir/$M-$blobhash.pk3" "maps/$M.bsp" "maps/$M.log" "maps/$M/" "maps/$M.lin" "gfx/${M}_mini.tga"
        ln -snf "../$M-$blobhash.pk3" "$bspdir/latest/$M.pk3" # from ALL branches, so beware!
@@ -150,7 +168,6 @@ case "$1" in
                git checkout master
                ;;
        download)
-               rm -rf "$bspdir.old"
                mkdir -p "$bspdir" "$bspdir.old"
                mv "$bspdir"/*-????????????????????????????????????????-????????????????????????????????????????.pk3 "$bspdir.old"/ || true
                cd data/xonotic-maps.pk3dir