summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2009-07-26 21:03:19 +0000
committerrillig <rillig@pkgsrc.org>2009-07-26 21:03:19 +0000
commitf6e862073d93e0c651c2a9838f3f485561c1e6e3 (patch)
tree29732d7555d72b4dd5499a37fb77c5afc093895b /pkgtools
parentf930fde4a06a84ac07991e2fb80fa34f17e4fc53 (diff)
downloadpkgsrc-f6e862073d93e0c651c2a9838f3f485561c1e6e3.tar.gz
Fixed the parser for shell commands, so that it recognizes the $$$$
variable.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 04b4dcf1396..aae7aafc749 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.818 2009/07/26 19:30:33 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.819 2009/07/26 21:03:19 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -1374,6 +1374,7 @@ my $regex_shellword = qr"\s*(
| \$[/\@<^] # special make(1) variables
| \$\$[0-9A-Z_a-z]+ # shell variable
| \$\$[\#?@] # special shell variables
+ | \$\$\$\$ # the special pid shell variable
| \$\$\{[0-9A-Z_a-z]+\} # shell variable in braces
| \$\$\( # POSIX-style backticks replacement
| [^\(\)'\"\\\s;&\|<>\`\$] # non-special character
@@ -4204,7 +4205,8 @@ sub checkline_mk_shellword($$$) {
$state = SWST_BACKT;
} elsif ($rest =~ s/^\\(?:[ !"#'\(\)*;?\\^{|}]|\$\$)//) {
} elsif ($rest =~ s/^\$\$([0-9A-Z_a-z]+|\#)//
- || $rest =~ s/^\$\$\{([0-9A-Z_a-z]+|\#)\}//) {
+ || $rest =~ s/^\$\$\{([0-9A-Z_a-z]+|\#)\}//
+ || $rest =~ s/^\$\$(\$)\$//) {
my ($shvarname) = ($1);
if ($opt_warn_quoting && $check_quoting) {
$line->log_warning("Unquoted shell variable \"${shvarname}\".");