Author: adam-guest
Date: 2008-03-29 11:40:49 +0000 (Sat, 29 Mar 2008)
New Revision: 1220
Modified:
trunk/debian/changelog
trunk/scripts/checkbashisms.pl
Log:
+ Improve quoted string handling to cope with "'foo'"
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-03-29 09:29:35 UTC (rev 1219)
+++ trunk/debian/changelog 2008-03-29 11:40:49 UTC (rev 1220)
@@ -14,6 +14,7 @@
+ Add checks for pushd and popd
+ Remove check for $((var+1)) as dash now supports the syntax (the syntax
is POSIX compliant but was not supported properly by dash)
+ + Improve quoted string handling to cope with "'foo'"
* dcmd: Apply patch from Romain to correctly match the x11 section
* debcheckout:
+ Tighten the "repository owner" regex for darcs.d.o to correctly check
Modified: trunk/scripts/checkbashisms.pl
===================================================================
--- trunk/scripts/checkbashisms.pl 2008-03-29 09:29:35 UTC (rev 1219)
+++ trunk/scripts/checkbashisms.pl 2008-03-29 11:40:49 UTC (rev 1220)
@@ -216,11 +216,11 @@
my $line = $_;
if ($quote_string ne "") {
+ my $otherquote = ($quote_string eq "\"" ? "\'" : "\"");
# Inside a quoted block
- if ($line =~ /(?:^|^.*?[^\\])$quote_string(.*)$/) {
+ if ($line =~ /(?:^|^.*?[^\\$otherquote])$quote_string(.*)$/) {
my $rest = $1;
my $templine = $line;
- my $otherquote = ($quote_string eq "\"" ? "\'" : "\"");
# Remove quoted strings delimited with $otherquote
$templine =~ s/$otherquote[^$quote_string]*?$otherquote//g;
--
To unsubscribe, send mail to [EMAIL PROTECTED]