about summary refs log tree commit diff
path: root/contrib/ngindent
blob: f09b9ea165ffae5377dc96a4aa2b7926e85a3174 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

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"

if [ -z "$INDENT" ]; then
	echo "Error: GNU \"indent\" not found!"
	exit 1
fi

$INDENT -v $INDENTARGS $*

# -eof-