gst-indent: Run indent twice. Once is not idempotent, twice seems to be.
authorJan Schmidt <jan@centricular.com>
Sat, 18 Oct 2014 06:27:04 +0000 (17:27 +1100)
committerJan Schmidt <jan@centricular.com>
Mon, 20 Oct 2014 12:55:47 +0000 (23:55 +1100)
tools/gst-indent

index 9309ed3..e75338b 100755 (executable)
@@ -23,6 +23,9 @@ case `$INDENT --version` in
       ;;
 esac
 
+# Run twice. GNU indent isn't idempotent
+# when run once
+for i in 1 2; do
 $INDENT \
   --braces-on-if-line \
   --case-brace-indentation0 \
@@ -37,4 +40,5 @@ $INDENT \
   --tab-size8 \
   --indent-level2 \
   --leave-preprocessor-space \
-  $*
+  $* || exit $?
+done