aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xTools/scripts/portsearch7
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