ngindent 385 B

1234567891011121314151617
  1. #!/bin/sh
  2. INDENTARGS="-kr -i8 -ts8 -l80 -c3 -cd41 -ss -ncs -psl"
  3. # check if indent(1) is available
  4. command -v indent >/dev/null 2>&1 && INDENT="indent"
  5. command -v gindent >/dev/null 2>&1 && INDENT="gindent"
  6. command -v gnuindent >/dev/null 2>&1 && INDENT="gnuindent"
  7. if [ -z "$INDENT" ]; then
  8. echo "Error: GNU \"indent\" not found!"
  9. exit 1
  10. fi
  11. $INDENT -v $INDENTARGS "$@"
  12. # -eof-