autobuild fixes
[xonotic/xonotic.git] / misc / tools / xonotic-map-compiler
index 3820aff435f1bb68db8bd3a2886f0c8613251e8c..8b6cd4d59b32ce39eb3ce7eafec4b463a60caa4f 100755 (executable)
@@ -232,6 +232,14 @@ for my $m(@{$options->{maps}})
                                }
                        }
                };
+
+               if(defined $shaderlist_new)
+               {
+                       mkdir "$mapdir/scripts";
+                       open my $fh, ">", "$mapdir/scripts/shaderlist.txt";
+                       print $fh $shaderlist_new;
+                       close $fh;
+               }
        }
 
        local $SIG{INT} = sub
@@ -243,14 +251,6 @@ for my $m(@{$options->{maps}})
 
        eval
        {
-               if(defined $shaderlist_new)
-               {
-                       mkdir "$mapdir/scripts";
-                       open my $fh, ">", "$mapdir/scripts/shaderlist.txt";
-                       print $fh $shaderlist_new;
-                       close $fh;
-               }
-
                unlink <$m/lm_*>; # delete old external lightmaps
                q3map2 '-bsp', @{$options->{bsp}},   "$m.map"
                        or die "-bsp: $?";