summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Pekala <pawel@FreeBSD.org>2015-02-20 16:30:26 +0000
committerPawel Pekala <pawel@FreeBSD.org>2015-02-20 16:30:26 +0000
commitbff25072b2ca84a468246d619633ff1d0b5af0d6 (patch)
tree1cd7bde9f925b96f403db04d208aa8e3c3710466
parentAdd -Wno-unused to prevent Werror from triggering with gcc48 (diff)
Support non default ports path.
PR: 194423 Submitted by: myself Approved by: maintainer timeout (4 months), trivial - just fix it
Notes
Notes: svn path=/head/; revision=379446
-rwxr-xr-xTools/scripts/portsearch5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tools/scripts/portsearch b/Tools/scripts/portsearch
index 51810acf9a73..ee394ab58325 100755
--- a/Tools/scripts/portsearch
+++ b/Tools/scripts/portsearch
@@ -46,8 +46,11 @@ use vars qw/ $key @list %fields %list %opts /;
my $osrel = `/usr/bin/uname -r`;
$osrel =~ s/\..+$//s;
+my $portsdir = "/usr/ports";
+$portsdir = $ENV{PORTSDIR} if ( defined $ENV{'PORTSDIR'} );
+
my $VERSION = "1.0";
-my $file = "/usr/ports/INDEX" . ($osrel <= 4 ? "" : "-$osrel");
+my $file = "$portsdir/INDEX" . ($osrel <= 4 ? "" : "-$osrel");
my $match = 1;
my $count = 0;
my $fulldesc = 0;