diff options
| author | Alexander Barton <alex@barton.de> | 2015-12-19 19:23:50 +0100 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2016-10-21 21:41:48 +0200 |
| commit | 804c2403203258ba8b9bf869be3f9ef057c2d39a (patch) | |
| tree | c2d6f9cd2a667547eb1cc4b2db87a44dbb303315 /contrib/ngindent | |
| parent | fb99d7c92efb432e1b10af9e8672b38d30b3d4ab (diff) | |
| download | ngircd-804c2403203258ba8b9bf869be3f9ef057c2d39a.tar.gz ngircd-804c2403203258ba8b9bf869be3f9ef057c2d39a.zip | |
autogen.sh, ngindent, platformtest.sh: Fix warnings of "shellcheck"
- SC2006: Use $(..) instead of legacy `..`.
- SC2015: Note that A && B || C is not if-then-else. C may run
when A is true.
- SC2086: Double quote to prevent globbing and word splitting.
- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Diffstat (limited to 'contrib/ngindent')
| -rwxr-xr-x | contrib/ngindent | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/ngindent b/contrib/ngindent index f09b9ea1..69636a4b 100755 --- a/contrib/ngindent +++ b/contrib/ngindent @@ -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- |