]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/xonotic-map-compiler-autobuild
next attempt to make this stupid mess work... why didn't Nikoli DOCUMENT what he...
[xonotic/xonotic.git] / misc / tools / xonotic-map-compiler-autobuild
index 0ef0c1fe2d911a42ba46cdf82a1915bdef65f974..8ab0f443ac234229a0073d369b862dee4af25a67 100755 (executable)
@@ -176,18 +176,12 @@ buildthemap()
        fi
        t0=`date +%s`
        (
-               cd maps
-               sz=`grep '^size ' "$M.mapinfo" 2>/dev/null || true`
-               if [ -n "$sz" ]; then
-                       minimap_override="-minimap + -minmax ${sz#size }"
-               else
-                       minimap_override=
-               fi
-               ../../../misc/tools/xonotic-map-compiler "$M" `grep ^- "$M.map.options" | cut -d '#' -f 1` $minimap_override $build_override > "$M.log" 2>&1
+               cd ../..
+               misc/tools/xonotic-map-compiler-optionsfile "data/xonotic-maps.pk3dir/maps/$M" $build_override > "data/xonotic-maps.pk3dir/maps/$M.log" 2>&1
        )
        status=$?
        if ! [ -f "maps/$M.bsp" ]; then
-               echo >>"$M.log" "ERROR: No BSP file"
+               echo >>"maps/$M.log" "ERROR: No BSP file"
        fi
        t1=`date +%s`
        dt=$(($t1 - $t0))
@@ -204,6 +198,9 @@ buildthemap()
        if [ -n "$IRCSPAM" ]; then
                $IRCSPAM < "maps/$M.irc" || true
        fi
+       if [ -n "$BUILD_ONE" ]; then
+               exit
+       fi
 }
 
 screenshotthemap()
@@ -255,6 +252,9 @@ screenshotthemap()
        if [ -n "$IRCSPAM" ]; then
                $IRCSPAM < "$M-$blobhash/$M.ircss" || true
        fi
+       if [ -n "$BUILD_ONE" ]; then
+               exit
+       fi
 }
 
 getthemap()