]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/auxiliar/fixscm.sh
Imported Upstream version 2.18.0
[lilypond.git] / scripts / auxiliar / fixscm.sh
diff --git a/scripts/auxiliar/fixscm.sh b/scripts/auxiliar/fixscm.sh
new file mode 100755 (executable)
index 0000000..9c8f2f3
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# Indent and untabify source files (given by their
+# filenames in the command line), according to
+# LilyPond source style standards.
+
+elisp_expression='(progn
+  (delete-trailing-whitespace)
+  (indent-region (point-min) (point-max) nil)
+  (untabify (point-min) (point-max))
+  (save-buffer))'
+for f in "$@"; do
+  emacs -batch "$f" --eval "${elisp_expression}"
+done