summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files
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
commit8c38f5ebfcd03d506d040d161b755dae3b0cda69 (patch)
tree29732d7555d72b4dd5499a37fb77c5afc093895b /pkgtools/pkglint/files
parentbb2fa68034ac163040d378abca1512f81b21c73a (diff)
downloadpkgsrc-8c38f5ebfcd03d506d040d161b755dae3b0cda69.tar.gz
Fixed the parser for shell commands, so that it recognizes the $$$$
variable.
Diffstat (limited to 'pkgtools/pkglint/files')
-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}\".");