File: mpd-indent.sh

package info (click to toggle)
mpd 0.16.7-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 5,440 kB
  • sloc: ansic: 44,071; sh: 4,241; xml: 3,185; makefile: 1,032; cpp: 301
file content (6 lines) | stat: -rwxr-xr-x 271 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
#!/bin/sh
indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cdw -cd0 -c0 -cp0 "$@"

# there doesn't seem to be an indent switch for this, but this
# forces goto labels to the left-most column, without indentation
perl -i -p -e 's/^\s+(\w+):/$1:/g unless /^\s+default:/' "$@"