contrib/buildsystems: ignore irrelevant files in Generators/
The Generators/ directory can contain spurious files such as editors' backup files. Even worse, there could be .swp files which are not even valid Perl scripts. Let's just ignore anything but .pm files in said directory. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jul 29, 2019 at 13:08 UTC
e88919bfe285965bf99e3302a90187ba6f117be6
1 file changed
+1
-1
contrib/buildsystems/Generators.pm
+1
-1
@@ -17,7 +17,7 @@ BEGIN {
17
$me = dirname($me);
18
if (opendir(D,"$me/Generators")) {
19
foreach my $gen (readdir(D)) {
20
- next if ($gen =~ /^\.\.?$/);
20
+ next unless ($gen =~ /\.pm$/);
21
require "${me}/Generators/$gen";
22
$gen =~ s,\.pm,,;
23
push(@AVAILABLE, $gen);