diff options
author | Oliver Eikemeier <eik@FreeBSD.org> | 2004-05-14 18:03:55 +0000 |
---|---|---|
committer | Oliver Eikemeier <eik@FreeBSD.org> | 2004-05-14 18:03:55 +0000 |
commit | 1e3bf4436f696a561cf163e9b818328b821db41d (patch) | |
tree | 60e7f861e923b6e824226a7369f08935d351db78 /Tools | |
parent | Add newsstar, a program that fetches news from a number of remote NNTP servers (diff) |
add support for ignoring local ports / categories:
env 'EXCLUDE=local devel/local' /usr/ports/Tools/scripts/chkmodules.pl
Notes
Notes:
svn path=/head/; revision=109154
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/chkmodules.pl | 5 |
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) |