From 9d330c09ab63900342f1977c37a83753e730b794 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matthias=20Kr=C3=BCger?= Date: Fri, 14 Jun 2013 23:06:27 +0200 Subject: [PATCH] error if map file can't be found. --- misc/tools/all/xonotic.subr | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/misc/tools/all/xonotic.subr b/misc/tools/all/xonotic.subr index 9378e935..6995ad1b 100644 --- a/misc/tools/all/xonotic.subr +++ b/misc/tools/all/xonotic.subr @@ -4,13 +4,19 @@ case "$cmd" in misc/tools/xonotic-map-compiler-autobuild download ;; compile-map) + mapfile="data/xonotic-maps.pk3dir/maps/$1.map" if [ ! -f "netradiant/install/q3map2.x86" ] ; then msg "q3map2 needed! Building netradiant..." cd netradiant make cd ../ fi - misc/tools/xonotic-map-compiler_from_all ./data/xonotic-maps.pk3dir/maps/$1 + if [ ! -f "$mapfile" ] ; then + msg "ERROR, $mapfile not found!" + exit 2 + else + time misc/tools/xonotic-map-compiler_from_all $mapfile + fi ;; compile) cleand0=false -- 2.39.2