summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-12-16 21:47:48 +0000
committerEric Wong <normalperson@yhbt.net>2007-12-16 21:47:48 +0000
commitf3d986e97b8f1b0d9557760503bca635bf51f34c (patch)
treed5b77c870ccda6ca8e47d7718b7673e206665332
parentfd75619c3bac332af3305986f52066410bd7aedb (diff)
scripts/mpd-indent.sh: fixup goto label indentation
Additionally, use proper shell quoting and shebang line git-svn-id: https://svn.musicpd.org/mpd/trunk@7078 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rwxr-xr-xscripts/mpd-indent.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/mpd-indent.sh b/scripts/mpd-indent.sh
index 992cf9dc5..0bf54189a 100755
--- a/scripts/mpd-indent.sh
+++ b/scripts/mpd-indent.sh
@@ -1 +1,6 @@
-indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cdw -cd0 -c0 -cp0 $@
+#!/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:/' "$@"