diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-05-12 14:00:36 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-05-12 14:00:36 +0000 |
commit | 3ec43b7435890a398936b8625e184eb76c26c9ff (patch) | |
tree | cb16783c21e5930763c2bf3cd18bacac0906198b /usr.sbin/pkg_add | |
parent | 3c9b9a84a5e0447430a58957103fd10a8a4b0767 (diff) |
strip extra quotes from all defines.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r-- | usr.sbin/pkg_add/pkg_create | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/pkg_create b/usr.sbin/pkg_add/pkg_create index 88f9256df6a..6a57557cd87 100644 --- a/usr.sbin/pkg_add/pkg_create +++ b/usr.sbin/pkg_add/pkg_create @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_create,v 1.96 2007/05/07 09:37:30 espie Exp $ +# $OpenBSD: pkg_create,v 1.97 2007/05/12 14:00:35 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -431,8 +431,6 @@ sub add_description OpenBSD::PackingElement::File->add($plist, $name); my $comment = $defines{COMMENT}; if (defined $comment) { - $comment =~ s/^\"(.*)\"$/$1/ or - $comment =~ s/^\'(.*)\'$/$1/; if (length $comment > 60) { print STDERR "Error: comment is too long\n"; print STDERR $comment, "\n"; @@ -492,7 +490,10 @@ try { sub { local $_ = shift; if (m/\=/) { - $defines{$`} = $'; + my ($k, $v) = ($`,$'); + $v =~ s/^\'(.*)\'$/$1/; + $v =~ s/^\"(.*)\"$/$1/; + $defines{$k} = $v; } else { $defines{$_} = 1; } |