mirror of
https://github.com/osmarks/ngircd.git
synced 2024-12-13 18:30:27 +00:00
804c240320
- 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.
18 lines
385 B
Bash
Executable File
18 lines
385 B
Bash
Executable File
#!/bin/sh
|
|
|
|
INDENTARGS="-kr -i8 -ts8 -l80 -c3 -cd41 -ss -ncs -psl"
|
|
|
|
# check if indent(1) is available
|
|
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 "$@"
|
|
|
|
# -eof-
|