xonotic/misc/infrastructure/xonotic-map-compiler.cron
2021-04-01 14:20:40 +02:00

21 lines
601 B
Bash
Executable File

#!/bin/sh
mepwd=$PWD
me=$0
if ! lockfile-create "$me"; then
exit 1
fi
lockfile-touch "$me" & lockpid=$!
trap 'kill $lockpid || true; cd "$mepwd"; lockfile-remove "$me"' EXIT
trap 'exit 1' INT TERM
set -ex
[ -d xonotic-map-compiler ] || git clone git://git.xonotic.org/xonotic/xonotic.git xonotic-map-compiler
cd xonotic-map-compiler
./all clean -m -fU -D # like reclone but do not delete untracked, so q3map2.x86 compile stays
cd netradiant
cmake -G "Unix Makefiles" -H. -Bbuild -DCMAKE_BUILD_TYPE=Release
cmake --build build -- q3map2
cd ..
sh -x ./misc/tools/xonotic-map-compiler-autobuild build