1
0
mirror of https://github.com/git/git.git synced 2024-09-28 08:49:45 +02:00

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>
This commit is contained in:
Johannes Schindelin 2019-07-29 13:08:04 -07:00 committed by Junio C Hamano
parent 865406bc54
commit e88919bfe2

View File

@ -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);