From: espie Date: Wed, 25 Oct 2023 11:14:42 +0000 (+0000) Subject: okay, that one ought to work. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=77679933cb537a572105552695ac86b5d4efd3a1;p=openbsd okay, that one ought to work. Recognize + only right before = --- diff --git a/usr.sbin/pkg_add/OpenBSD/Subst.pm b/usr.sbin/pkg_add/OpenBSD/Subst.pm index 062898ae0b6..3637a74d9b7 100644 --- a/usr.sbin/pkg_add/OpenBSD/Subst.pm +++ b/usr.sbin/pkg_add/OpenBSD/Subst.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Subst.pm,v 1.25 2023/10/24 13:28:43 naddy Exp $ +# $OpenBSD: Subst.pm,v 1.26 2023/10/25 11:14:42 espie Exp $ # # Copyright (c) 2008 Marc Espie # @@ -50,6 +50,13 @@ sub parse_option($self, $opt) my ($k, $v) = ($1, $2); $v =~ s/^\'(.*)\'$/$1/; $v =~ s/^\"(.*)\"$/$1/; + # variable name can't end with a '+', + # recognize this as '+=' instead + if ($k =~ s/\+$//) { + if (defined $self->{$k}) { + return $self->{$k} .= " $v"; + } + } $self->add($k, $v); } else { $self->add($opt, 1);