mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
add support for ignoring local ports / categories:
env 'EXCLUDE=local devel/local' /usr/ports/Tools/scripts/chkmodules.pl
This commit is contained in:
parent
5d58a5f47f
commit
1e3bf4436f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=109154
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user