summaryrefslogtreecommitdiffstats
path: root/misc/porteasy
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2004-10-22 13:50:12 +0000
committerdes <des@FreeBSD.org>2004-10-22 13:50:12 +0000
commit57db63409d634054ce4b098ff55517442e7f43ca (patch)
tree97e5c356e1bde8d18259590f269f2dd99c86c015 /misc/porteasy
parent07048453a1de6758fff636e9e191fb796f7cd9eb (diff)
downloadFreeBSD-ports-57db63409d634054ce4b098ff55517442e7f43ca.zip
FreeBSD-ports-57db63409d634054ce4b098ff55517442e7f43ca.tar.gz
Don't croak on port names that contain metacharacters.
Diffstat (limited to 'misc/porteasy')
-rw-r--r--misc/porteasy/Makefile2
-rw-r--r--misc/porteasy/src/porteasy.pl8
2 files changed, 6 insertions, 4 deletions
diff --git a/misc/porteasy/Makefile b/misc/porteasy/Makefile
index a255f3a..9c4c07e 100644
--- a/misc/porteasy/Makefile
+++ b/misc/porteasy/Makefile
@@ -8,7 +8,7 @@
#
PORTNAME= porteasy
-PORTVERSION= 2.7.18
+PORTVERSION= 2.7.19
CATEGORIES= misc
MASTER_SITES= # none
DISTFILES= # none
diff --git a/misc/porteasy/src/porteasy.pl b/misc/porteasy/src/porteasy.pl
index 9cfb1e4..9c2a487 100644
--- a/misc/porteasy/src/porteasy.pl
+++ b/misc/porteasy/src/porteasy.pl
@@ -33,7 +33,7 @@ use strict;
use Fcntl;
use Getopt::Long;
-my $VERSION = "2.7.18";
+my $VERSION = "2.7.19";
my $COPYRIGHT = "Copyright (c) 2000-2004 Dag-Erling Smørgrav. " .
"All rights reserved.";
@@ -422,8 +422,10 @@ sub find_port($) {
my @suggest; # Suggestions
stderr("Can't find required port '$port'");
- @suggest = grep(/^$port/i, keys(%ports));
- if (@suggest == 1 && $suggest[0] =~ m/^$port[0-9.-]/) {
+ my $portre = $port;
+ $portre =~ s/([^\w])/\\$1/g;
+ @suggest = grep(/^$portre/i, keys(%ports));
+ if (@suggest == 1 && $suggest[0] =~ m/^$portre[0-9.-]/) {
$port = $ports{$suggest[0]};
stderr(", assuming you mean $pkgname{$port}.\n");
return $port;
OpenPOWER on IntegriCloud