summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2009-07-26 21:03:19 +0000
committerrillig <rillig>2009-07-26 21:03:19 +0000
commit08d8aa42ed81f6cc9c50468e355a68cfc5b1bac6 (patch)
tree29732d7555d72b4dd5499a37fb77c5afc093895b /pkgtools
parent1998e61aed7a49e2f4cce647fde101bb9d9257f1 (diff)
downloadpkgsrc-08d8aa42ed81f6cc9c50468e355a68cfc5b1bac6.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}\".");