From 155056f38632dbe0fed086ab750fc08dfe91a102 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Sun, 23 Jul 2006 11:34:32 +0000 Subject: Added ngindent. --- contrib/ngindent | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 contrib/ngindent (limited to 'contrib/ngindent') diff --git a/contrib/ngindent b/contrib/ngindent new file mode 100755 index 00000000..73537a6d --- /dev/null +++ b/contrib/ngindent @@ -0,0 +1,16 @@ +#/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 gnuindent >/dev/null 2>&1 && INDENT="gnuindent" + +if [ -z "$INDENT" ]; then + echo "Error: GNU \"indent\" not found!" + exit 1 +fi + +$INDENT -v $INDENTARGS $* + +# -eof- -- cgit 1.4.1