]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tools: checkconfig.sh: make scripts bourne sh compliant [checkbashisms]
authorSami Kerola <kerolasa@iki.fi>
Sun, 18 Mar 2012 20:34:09 +0000 (21:34 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 30 Mar 2012 14:48:12 +0000 (16:48 +0200)
script checkconfig.sh does not appear to be a /bin/sh script
possible bashism in checkconfig.sh line 14 ('function' is useless):
function die() {
possible bashism in checkconfig.sh line 27 ('((' should be '$(('):
while (( "$#" )); do

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
tools/checkconfig.sh

index 984e72bea2d55e17cb65f8eca05b1229806a2bbf..91f7b1c05c2803937f2fe1ed2373c0ab507632ad 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #
 # This script checks for HAVE_ and ENABLE_ macros which are
@@ -11,7 +11,7 @@
 #
 
 
-function die() {
+die() {
        echo "error: $1"
        exit 1
 }
@@ -24,7 +24,7 @@ config="$srcdir/config.h.in"
 
 shift
 
-while (( "$#" )); do
+while [ "$#" -ne 0 ]; do
        srcfile=$1
        shift