summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xTools/scripts/chkmodules.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tools/scripts/chkmodules.pl b/Tools/scripts/chkmodules.pl
index 9c0a764870b0..bf0d39ffc015 100755
--- a/Tools/scripts/chkmodules.pl
+++ b/Tools/scripts/chkmodules.pl
@@ -44,17 +44,20 @@ use strict;
my $portsdir = $ENV{PORTSDIR} ? $ENV{PORTSDIR} : '/usr/ports';
my $cvsroot = $ENV{CVSROOT} ? $ENV{CVSROOT} : '/home/ncvs/CVSROOT-ports';
+my @excludes = $ENV{EXCLUDE} ? split(' ', $ENV{EXCLUDE}) : ('local', 'rookies');
-d "$portsdir" or die "Can't find ports tree at $portsdir.\n";
-f "$cvsroot/modules" or die "Can't read modules file $cvsroot/modules.\n";
my %ports = ('ports' => 1);
+my $excludepattern = '(?:'.join('|', 'distfiles', 'packages', @excludes).')';
+
sub wanted {
!-d
|| (
/^CVS$/
- || $File::Find::name =~ m"^$portsdir/(?:distfiles|packages)$"os
+ || $File::Find::name =~ m"^$portsdir/$excludepattern$"os
|| $File::Find::name =~ m"^$portsdir/[^/]+/pkg$"os
)
&& ($File::Find::prune = 1)