aboutsummaryrefslogblamecommitdiffstats
path: root/scripts/mpd-indent.sh
blob: 0bf54189ae4c14b90d558b4d873c02fb6f4fc6dd (plain) (tree)
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:/' "$@"