Subject: [PATCH 17/18] checkbashisms: detect uses of sleep with anything other than an int.

From: Raphael Geissert <[email-masked]>
Date: Wed, 24 Oct 2012 18:24:01 -0500

SUSv3 only requires sleep to take a single integer representing the
number of seconds to sleep.

Signed-off-by: Raphael Geissert <[email-masked]>
---
 scripts/checkbashisms.pl |    1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/checkbashisms.pl b/scripts/checkbashisms.pl
index 7e60f5c..5653c5a 100755
--- a/scripts/checkbashisms.pl
+++ b/scripts/checkbashisms.pl
@@ -627,6 +627,7 @@ sub init_hashes {
 	$LEADIN . qr'trap\s+["\']?.*["\']?\s+.*(?:ERR|DEBUG|RETURN)' => q<trap with ERR|DEBUG|RETURN>,
 	$LEADIN . qr'(?:exit|return)\s+-\d' => q<exit|return with negative status code>,
 	$LEADIN . qr'(?:exit|return)\s+--' => q<'exit --' should be 'exit' (idem for return)>,
+	$LEADIN . qr'sleep\s+(?:-|\d+(?:[.a-z]|\s+\d))' => q<sleep only takes one integer>,
     );
 
     %string_bashisms = (
-- 
1.7.10