Author: adam-guest
Date: 2008-03-16 19:41:49 +0000 (Sun, 16 Mar 2008)
New Revision: 1157

Modified:
   trunk/debian/changelog
   trunk/scripts/checkbashisms.pl
Log:
checkbashisms:
  + Make --version actually produce version information
  + Fix explanation of VAR+=foo

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-03-16 17:01:44 UTC (rev 1156)
+++ trunk/debian/changelog      2008-03-16 19:41:49 UTC (rev 1157)
@@ -1,3 +1,11 @@
+devscripts (2.10.20) UNRELEASED; urgency=low
+
+  * checkbashisms:
+    + Make --version actually produce version information
+    + Fix explanation of VAR+=foo
+
+ -- Adam D. Barratt <[EMAIL PROTECTED]>  Sun, 16 Mar 2008 19:40:40 +0000
+
 devscripts (2.10.19) unstable; urgency=low
 
   * debsign: Correctly handle signing an automatically located .changes

Modified: trunk/scripts/checkbashisms.pl
===================================================================
--- trunk/scripts/checkbashisms.pl      2008-03-16 17:01:44 UTC (rev 1156)
+++ trunk/scripts/checkbashisms.pl      2008-03-16 19:41:49 UTC (rev 1157)
@@ -52,6 +52,8 @@
 ##
 ## handle command-line options
 ##
+$opt_help = 1 if int(@ARGV) == 0;
+
 GetOptions("help|h" => \$opt_help,
           "version|v" => \$opt_version,
           "newline|n" => \$opt_echo,
@@ -60,7 +62,7 @@
            )
     or die "Usage: $progname [options] filelist\nRun $progname --help for more 
details\n";
 
-if (int(@ARGV) == 0 or $opt_help) { print $usage; exit 0; }
+if ($opt_help) { print $usage; exit 0; }
 if ($opt_version) { print $version; exit 0; }
 
 my $status = 0;
@@ -141,7 +143,7 @@
                '\s\|\&' =>                    q<pipelining is not POSIX>,
                '[^\\\]\{([^\s]+?,)+[^\\\}\s]+\}' =>
                                               q<brace expansion>,
-               '(?:^|\s+)\w+\+=' =>           q<should be VAR="$VAR foo">,
+               '(?:^|\s+)\w+\+=' =>           q<should be VAR="${VAR}foo">,
                '(?:^|\s+)\w+\[\d+\]=' =>      q<bash arrays, H[0]>,
                '(?:^|\s+)(read\s*(-[^r])?(?:;|$))' => q<should be read [-r] 
variable>,
                '\$\(\([A-Za-z]' => q<cnt=$((cnt + 1)) does not work in dash>,



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

Reply via email to