aboutsummaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2015-02-21 00:30:26 +0800
committerpawel <pawel@FreeBSD.org>2015-02-21 00:30:26 +0800
commit938a8b730c3d7c52f2be8add110c05f2acb92e39 (patch)
tree1cd7bde9f925b96f403db04d208aa8e3c3710466 /Tools/scripts
parentb84cf39fd77d4da646dee0cbfa07c17af3717679 (diff)
downloadfreebsd-ports-gnome-938a8b730c3d7c52f2be8add110c05f2acb92e39.tar.gz
freebsd-ports-gnome-938a8b730c3d7c52f2be8add110c05f2acb92e39.tar.zst
freebsd-ports-gnome-938a8b730c3d7c52f2be8add110c05f2acb92e39.zip
Support non default ports path.
PR: 194423 Submitted by: myself Approved by: maintainer timeout (4 months), trivial - just fix it
Diffstat (limited to 'Tools/scripts')
-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;