]> git.donarmstrong.com Git - lilypond.git/blob - scripts/auxiliar/update-with-convert-ly.sh
b5afdfd6393706ae63d154ded570d2dcc696ca6c
[lilypond.git] / scripts / auxiliar / update-with-convert-ly.sh
1 #!/usr/bin/env bash
2
3 ### are we in the top source dir?
4 if [ ! -e scripts/convert-ly.py ]; then
5   echo "Must run from top source directory"
6   exit 1
7 fi
8
9 ### get the directories
10 TOP_SRC_DIR=`pwd`
11 if [ -z $BUILD_DIR ]; then
12   BUILD_DIR=.
13 fi
14
15 ### make sure convert-ly is up-to-date
16 touch python/convertrules.py
17 touch scripts/convert-ly.py
18 cd $BUILD_DIR
19 make
20 cd $TOP_SRC_DIR
21
22 ### update manuals
23 find Documentation/ -path 'Documentation/snippets' -prune -o -name out -prune \
24   -o -name 'out-*' -prune -o -name '*.itely' -print \
25   | xargs $BUILD_DIR/out/bin/convert-ly -e -d
26
27 ### update .ly files
28 # don't look in . otherwise it'll find stuff in build/ !
29 find Documentation/ input/ ly/ -name out -prune -o -name 'out-*' -prune \
30   -o \( -name '*.ly' -o -name '*.ily' \) -print \
31   | xargs $BUILD_DIR/out/bin/convert-ly -e -d