]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
error if map file can't be found.
authorMatthias Krüger <matthias.krueger@famsik.de>
Fri, 14 Jun 2013 21:06:27 +0000 (23:06 +0200)
committerMatthias Krüger <matthias.krueger@famsik.de>
Fri, 14 Jun 2013 21:06:27 +0000 (23:06 +0200)
misc/tools/all/xonotic.subr

index 9378e935172c9425d282bfc6a0937aec1bddfcf8..6995ad1b6c96d053aac6f706597dc1bd23fc628a 100644 (file)
@@ -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