summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-08-31 06:49:59 +0000
committerrillig <rillig@pkgsrc.org>2006-08-31 06:49:59 +0000
commit6473db4be8d78e4934959c9b71418de4e34886dc (patch)
treef679c701d4def450a5dfe00271e29947678ede2b /pkgtools
parenta3e6908fc3e4526a21bf3c1dc42e49c190a109c4 (diff)
downloadpkgsrc-6473db4be8d78e4934959c9b71418de4e34886dc.tar.gz
Made the shell word parser accept \$$ as a token. This avoids an
internal error showing up in benchmarks/netio.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index d06c7fcee0e..5217dc23676 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.671 2006/08/30 05:41:19 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.672 2006/08/31 06:49:59 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -1813,7 +1813,8 @@ my $regex_shellword = qr"\s*(
(?: '[^']*' # single quoted string
| \"(?:\\.|[^\"\\])*\" # double quoted string
| \`[^\`]*\` # backticks string
- | \\. # any escaped character
+ | \\\$\$ # an escaped dollar sign
+ | \\[^\$] # other escaped characters
| \$\{[^{}]+\} # make(1) variable
| \$\([^()]+\) # make(1) variable, $(...)
| \$[/\@<^] # special make(1) variables
@@ -4023,7 +4024,7 @@ sub checkline_mk_shellword($$$) {
$state = SWST_DQUOT;
} elsif ($rest =~ s/^\`//) {
$state = SWST_BACKT;
- } elsif ($rest =~ s/^\\[ !"#'\(\)*;\\^{|}]//) {
+ } elsif ($rest =~ s/^\\(?:[ !"#'\(\)*;\\^{|}]|\$\$)//) {
} elsif ($rest =~ s/^\$\$([0-9A-Z_a-z]+)//
|| $rest =~ s/^\$\$\{([0-9A-Z_a-z]+)\}//) {
my ($shvarname) = ($1);