]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/xonotic-map-compiler-autobuild
refactor map building so mapinfo size detection works too
[xonotic/xonotic.git] / misc / tools / xonotic-map-compiler-autobuild
index 0ef0c1fe2d911a42ba46cdf82a1915bdef65f974..d7a3a9364779c028fd16725b22432b99bad94b66 100755 (executable)
@@ -176,14 +176,8 @@ 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-data.pk3dir/maps/$M" $build_override > "$M.log" 2>&1
        )
        status=$?
        if ! [ -f "maps/$M.bsp" ]; then
@@ -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()