[SCM] Git repository for devscripts branch, master, updated. v2.12.4-72-gcf18b4b

Benjamin Drung bdrung at debian.org
Sat Nov 10 23:00:39 UTC 2012


The following commit has been merged in the master branch:
commit 82eba3b69993ea2c2ac32ee96d5c243c25a2a367
Author: Raphael Geissert <geissert at debian.org>
Date:   Thu Nov 1 13:07:12 2012 -0600

    checkbashisms: check for the use of $@/$* in certain param. expansions
    
    Signed-off-by: Raphael Geissert <geissert at debian.org>
    Signed-off-by: Benjamin Drung <bdrung at debian.org>

diff --git a/scripts/checkbashisms.pl b/scripts/checkbashisms.pl
index d6ac68e..3bad22a 100755
--- a/scripts/checkbashisms.pl
+++ b/scripts/checkbashisms.pl
@@ -635,11 +635,13 @@ sub init_hashes {
 
     %string_bashisms = (
 	qr'\$\[[^][]+\]' =>	         q<'$[' should be '$(('>,
-	qr'\$\{\w+\:(?:\d+|\$\{?\w+\}?)+(?::(?:\d+|\$\{?\w+\}?)+)?\}' =>   q<${foo:3[:1]}>,
+	qr'\$\{(?:\w+|@|\*)\:(?:\d+|\$\{?\w+\}?)+(?::(?:\d+|\$\{?\w+\}?)+)?\}' =>   q<${foo:3[:1]}>,
 	qr'\$\{!\w+[\@*]\}' =>           q<${!prefix[*|@]>,
 	qr'\$\{!\w+\}' =>                q<${!name}>,
 	qr'\$\{(?:\w+|@|\*)([,^]{1,2}.*?)\}' =>   q<${parm,[,][pat]} or ${parm^[^][pat]}>,
-	qr'\$\{\w+(/.+?){1,2}\}' =>      q<${parm/?/pat[/str]}>,
+	qr'\$\{[@*]([#%]{1,2}.*?)\}' =>   q<${[@|*]#[#]pat} or ${[@|*]%[%]pat}>,
+	qr'\$\{#[@*]\}'			=>   q<${#@} or ${#*}>,
+	qr'\$\{(?:\w+|@|\*)(/.+?){1,2}\}' =>      q<${parm/?/pat[/str]}>,
 	qr'\$\{\#?\w+\[[0-9\*\@]+\]\}' => q<bash arrays, ${name[0|*|@]}>,
 	qr'\$\{?RANDOM\}?\b' =>          q<$RANDOM>,
 	qr'\$\{?(OS|MACH)TYPE\}?\b'   => q<$(OS|MACH)TYPE>,

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list