diff options
author | Pawel Pekala <pawel@FreeBSD.org> | 2015-02-21 00:30:26 +0800 |
---|---|---|
committer | Pawel Pekala <pawel@FreeBSD.org> | 2015-02-21 00:30:26 +0800 |
commit | bff25072b2ca84a468246d619633ff1d0b5af0d6 (patch) | |
tree | 1cd7bde9f925b96f403db04d208aa8e3c3710466 /Tools/scripts | |
parent | f8d8b56ea068d4fc2fd94374111f85cd930b0b0a (diff) | |
download | freebsd-ports-gnome-bff25072b2ca84a468246d619633ff1d0b5af0d6.tar.gz freebsd-ports-gnome-bff25072b2ca84a468246d619633ff1d0b5af0d6.tar.zst freebsd-ports-gnome-bff25072b2ca84a468246d619633ff1d0b5af0d6.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-x | Tools/scripts/portsearch | 5 |
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; |