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
parent
865406bc54
commit
e88919bfe2
|
@ -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…
Reference in New Issue