Browse Source

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>
maint
Johannes Schindelin 6 years ago committed by Junio C Hamano
parent
commit
e88919bfe2
  1. 2
      contrib/buildsystems/Generators.pm

2
contrib/buildsystems/Generators.pm

@ -17,7 +17,7 @@ BEGIN { @@ -17,7 +17,7 @@ BEGIN {
$me = dirname($me);
if (opendir(D,"$me/Generators")) {
foreach my $gen (readdir(D)) {
next if ($gen =~ /^\.\.?$/);
next unless ($gen =~ /\.pm$/);
require "${me}/Generators/$gen";
$gen =~ s,\.pm,,;
push(@AVAILABLE, $gen);

Loading…
Cancel
Save