]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/auxiliar/update-with-convert-ly.sh
resolve merge
[lilypond.git] / scripts / auxiliar / update-with-convert-ly.sh
diff --git a/scripts/auxiliar/update-with-convert-ly.sh b/scripts/auxiliar/update-with-convert-ly.sh
new file mode 100755 (executable)
index 0000000..9bb4861
--- /dev/null
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+### are we in the top source dir?
+if [ ! -e scripts/convert-ly.py ]; then
+  echo "Must run from top source directory"
+  exit 1
+fi
+
+### get the directories
+TOP_SRC_DIR=`pwd`
+if [ -z $BUILD_DIR ]; then
+  BUILD_DIR=.
+fi
+
+### make sure convert-ly is up-to-date
+touch python/convertrules.py
+touch scripts/convert-ly.py
+cd $BUILD_DIR
+make
+cd $TOP_SRC_DIR
+
+### update manuals
+find Documentation/ -path 'Documentation/snippets' -prune -o \
+  -name '*.itely' | xargs $BUILD_DIR/out/bin/convert-ly -e -d
+
+### update .ly files
+# don't look in . otherwise it'll find stuff in build/ !
+find Documentation/ input/ ly/ \
+  -name '*.ly' | xargs $BUILD_DIR/out/bin/convert-ly -e -d