diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2005-09-04 23:11:15 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2005-09-04 23:11:15 +0000 |
commit | 6d4f3ffef5e1ad7bf1f85380cb7d50527692454b (patch) | |
tree | 4cd285a9786b710a45a79624d5ec35dc9c1439cd /Tools/scripts/portsearch | |
parent | - Add dependency on compat4x for i386 on 5.X and newer (diff) |
- Handle different INDEX filename on 5.X and above
PR: ports/85281
Submitted by: Vasil Dimov <vd@datamax.bg>
Diffstat (limited to 'Tools/scripts/portsearch')
-rwxr-xr-x | Tools/scripts/portsearch | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Tools/scripts/portsearch b/Tools/scripts/portsearch index e5390f291987..39ea41a21ff9 100755 --- a/Tools/scripts/portsearch +++ b/Tools/scripts/portsearch @@ -43,9 +43,12 @@ use vars qw/ $key @list %fields %list %opts /; # Global variables # +my $osrel = `/usr/bin/uname -r`; +$osrel =~ s/\..+$//s; + my $VERSION = "1.0"; -my $file = "/usr/ports/INDEX"; -my $match = 1; +my $file = "/usr/ports/INDEX" . ($osrel <= 4 ? "" : "-$osrel"); +my $match = 1; my $count = 0; # We only need 7 of the 10 fields in a record; define which ones in a |