]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
handle errors better
authorRudolf Polzer <divverent@alientrap.org>
Thu, 4 Nov 2010 06:30:42 +0000 (07:30 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 4 Nov 2010 06:30:42 +0000 (07:30 +0100)
misc/tools/xonotic-map-compiler-autobuild

index d366157d3df2f4db0f7fc70839c418ddf2e89de3..384123fcef7fbc6bdcaa0adbb8309681517cd691 100755 (executable)
@@ -116,6 +116,11 @@ log2spam()
                        WARNING:\ Couldn\'t\ find\ image\ for\ shader\ *)
                                s_failshaders="$s_failshaders ${L##* }"
                                ;;
+                       ERROR:\ *)
+                               if [ -z "$s_error" ]; then
+                                       s_error=$L
+                               fi
+                               ;;
                        '******* leaked *******')
                                s_leaked=1
                                ;;
@@ -178,11 +183,14 @@ buildthemap()
                else
                        minimap_override=
                fi
-               ../../../misc/tools/xonotic-map-compiler "$M" `grep ^- "$M.map.options" | cut -d '#' -f 1` $minimap_override $build_override > "$M.log"
+               ../../../misc/tools/xonotic-map-compiler "$M" `grep ^- "$M.map.options" | cut -d '#' -f 1` $minimap_override $build_override > "$M.log" 2>&1
        )
+       status=$?
+       if ! [ -f "maps/$M.bsp" ]; then
+               echo >>"$M.log" "ERROR: No BSP file"
+       fi
        t1=`date +%s`
        dt=$(($t1 - $t0))
-       status=$?
        if [ -n "$IRCSPAM" ]; then
                cat "maps/$M.log" | log2spam "$M" "$url$M-$blobhash.pk3" "$REFNAME" "$commithash" "$status" "$dt" > "maps/$M.irc"
        fi
@@ -209,6 +217,11 @@ screenshotthemap()
                continue
        fi
 
+       if ! unzip -l "$bspdir/$M-$blobhash.pk3" "maps/$M.bsp"; then
+               # no BSP file
+               continue
+       fi
+
        rm -rf ~/.xonotic
        (
                cd ../..