mirror of
https://github.com/git/git.git
synced 2026-01-17 22:26:32 +00: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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user