]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
autobuild: support overriding map bounds for minimap from mapinfo
authorRudolf Polzer <divverent@alientrap.org>
Tue, 5 Oct 2010 20:07:53 +0000 (22:07 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 5 Oct 2010 20:07:53 +0000 (22:07 +0200)
misc/tools/xonotic-map-compiler-autobuild

index 5c6db64de23a62450129bfe934511064b0d6b204..390b82d1d8ff37daf49bf2b94853497b87e8dd8e 100755 (executable)
@@ -157,7 +157,13 @@ buildthemap()
        t0=`date +%s`
        (
                cd maps
-               ../../../misc/tools/xonotic-map-compiler "$M" `grep ^- "$M.map.options" | cut -d '#' -f 1` $build_override > "$M.log"
+               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` $build_override $minimap_override > "$M.log"
        )
        t1=`date +%s`
        dt=$(($t1 - $t0))