File: ngindent

package info (click to toggle)
ngircd 25-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,736 kB
  • sloc: ansic: 19,041; sh: 5,175; makefile: 655; xml: 220
file content (17 lines) | stat: -rwxr-xr-x 385 bytes parent folder | download | duplicates (2)
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
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-