]> git.xonotic.org Git - xonotic/xonotic.git/blob - misc/tools/xonotic-map-compiler-optionsfile
4f798c6495b641cf42c075c199f3612064a2dfc9
[xonotic/xonotic.git] / misc / tools / xonotic-map-compiler-optionsfile
1 #!/bin/sh
2
3 M=${1%.map}
4 shift
5
6 sz=`grep '^size ' "$M.mapinfo" 2>/dev/null || true`
7 if [ -n "$sz" ]; then
8         minimap_override="-minimap + -minmax ${sz#size }"
9 else
10         minimap_override=
11 fi
12
13 mkdir -p ~/.xonotic-map-compiler-autobuild/ # to store map compile times
14
15 tstart=`date +%s`
16
17
18 misc/tools/xonotic-map-compiler "$M" `grep ^- "$M.map.options" | cut -d '#' -f 1` $minimap_override "$@"
19
20 tend=`date +%s`
21 let tdelta=$tend-$tstart # compute time
22
23 cd ~/.xonotic-map-compiler-autobuild/
24 echo $tdelta > ${M:30} # save time in ~/.xonotic-map-compiler-autobuild/mapname