]> arthur.barton.de Git - ngircd-alex.git/blobdiff - contrib/ngindent
autogen.sh, ngindent, platformtest.sh: Fix warnings of "shellcheck"
[ngircd-alex.git] / contrib / ngindent
index f09b9ea165ffae5377dc96a4aa2b7926e85a3174..69636a4b8cfa14161321a91b5efab92bb9382f70 100755 (executable)
@@ -3,15 +3,15 @@
 INDENTARGS="-kr -i8 -ts8 -l80 -c3 -cd41 -ss -ncs -psl"
 
 # check if indent(1) is available
-type indent >/dev/null 2>&1 && INDENT="indent"
-type gindent >/dev/null 2>&1 && INDENT="gindent"
-type gnuindent >/dev/null 2>&1 && INDENT="gnuindent"
+command -v indent >/dev/null 2>&1 && INDENT="indent"
+command -v gindent >/dev/null 2>&1 && INDENT="gindent"
+command -v gnuindent >/dev/null 2>&1 && INDENT="gnuindent"
 
 if [ -z "$INDENT" ]; then
        echo "Error: GNU \"indent\" not found!"
        exit 1
 fi
 
-$INDENT -v $INDENTARGS $*
+$INDENT -v $INDENTARGS "$@"
 
 # -eof-