Author: adam-guest
Date: 2008-05-11 11:15:11 +0000 (Sun, 11 May 2008)
New Revision: 1437

Modified:
   trunk/debian/changelog
   trunk/scripts/checkbashisms.pl
Log:
Further improve the heredoc detection (to allow the space in "<< 'foo'")

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-05-09 19:49:59 UTC (rev 1436)
+++ trunk/debian/changelog      2008-05-11 11:15:11 UTC (rev 1437)
@@ -11,6 +11,7 @@
     + Update the check for "echo -e" to only match -n as an extra option
       rather than all theoretically possible options, thus reducing false
       positives
+    + Further improve the heredoc detection (to allow the space in "<< 'foo'")
   * cowpoke: New script to upload a Debian source package to a cowbuilder host
     and build it, optionally also signing and uploading the result to an
     incoming queue (Closes: #479274)

Modified: trunk/scripts/checkbashisms.pl
===================================================================
--- trunk/scripts/checkbashisms.pl      2008-05-09 19:49:59 UTC (rev 1436)
+++ trunk/scripts/checkbashisms.pl      2008-05-11 11:15:11 UTC (rev 1437)
@@ -285,7 +285,12 @@
            $line =~ s/(^|[^\\\'\"])\"\'\"/$1/g;
            $line =~ s/(^|[^\\\'\"])\'\"\'/$1/g;
 
+           # $cat_line contains the version of the line we'll check
+           # for heredoc delimeters later. Initially, remove any
+           # spaces between << and the delimeter to make the following
+           # updates to $cat_line easier.
            my $cat_line = $line;
+           $cat_line =~ s/(<\<)\s+/$1/g;
 
            # Ignore anything inside single quotes; it could be an
            # argument to grep or the like.



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to