diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2004-10-22 13:50:12 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2004-10-22 13:50:12 +0000 |
commit | f15952d8a2b33a45c3fc06dd48d3db9a9fbc9658 (patch) | |
tree | aca8345d1ff0d1a050485f4214ab8b8aff7b6af4 /ports-mgmt/porteasy | |
parent | - Fix typo in the name of configuration parameter (s/unixform/unixfrom/) (diff) |
Don't croak on port names that contain metacharacters.
Notes
Notes:
svn path=/head/; revision=119971
Diffstat (limited to 'ports-mgmt/porteasy')
-rw-r--r-- | ports-mgmt/porteasy/Makefile | 2 | ||||
-rw-r--r-- | ports-mgmt/porteasy/src/porteasy.pl | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/ports-mgmt/porteasy/Makefile b/ports-mgmt/porteasy/Makefile index a255f3aa5b5e..9c4c07e01e75 100644 --- a/ports-mgmt/porteasy/Makefile +++ b/ports-mgmt/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/ports-mgmt/porteasy/src/porteasy.pl b/ports-mgmt/porteasy/src/porteasy.pl index 9cfb1e469a8d..9c2a4875d304 100644 --- a/ports-mgmt/porteasy/src/porteasy.pl +++ b/ports-mgmt/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; |