summaryrefslogtreecommitdiff
path: root/Konzerte
diff options
context:
space:
mode:
Diffstat (limited to 'Konzerte')
-rw-r--r--Konzerte/2018_04_15/alles.ly3
-rwxr-xr-xKonzerte/2018_04_15/make64
2 files changed, 67 insertions, 0 deletions
diff --git a/Konzerte/2018_04_15/alles.ly b/Konzerte/2018_04_15/alles.ly
new file mode 100644
index 0000000..67e064f
--- /dev/null
+++ b/Konzerte/2018_04_15/alles.ly
@@ -0,0 +1,3 @@
+\version "2.19.80"
+
+%LOOP%\include "../../%TEIL%/%TEIL-BASE%.pre"
diff --git a/Konzerte/2018_04_15/make b/Konzerte/2018_04_15/make
new file mode 100755
index 0000000..4bb69ea
--- /dev/null
+++ b/Konzerte/2018_04_15/make
@@ -0,0 +1,64 @@
+#!/bin/bash
+
+set -e
+
+cd "$(dirname "$0")"
+
+teile=(
+ Kyrie
+ Denn_er_hat_seinen_Engeln_
+ Hoere_nun_Herr_die_Bitten
+ Ich_sing_dir_mein_Lied
+ Gott_hat_mir_laengst_einen_Engel_gesandt
+ Ueber_dir_wach_ein_Engel
+)
+
+rm -f *.pre
+
+for teil in "${teile[@]}"
+do
+ (
+ cd ../../${teil}
+ sed -n '
+ s/^[^:]*%\.pdf.*:\s*//
+ T
+ s/%/'"${teil##*/}"'/g
+ p
+ ' Makefile | \
+ tr ' ' '\n' | \
+ grep '\.pre$' | \
+ xargs -r make "$@"
+ )
+done
+
+{
+ printf '\n\n'
+ cat alles.ly
+ printf '\n\n'
+} | \
+ while read -r line
+ do
+ if [[ "${line}" = '%LOOP%'* ]]
+ then
+ loopLines="${loopLines}
+${line#%LOOP%}"
+ else
+ if [ -n "${loopLines}" ]
+ then
+ for teil in "${teile[@]}"
+ do
+ echo "${loopLines}" | \
+ sed "
+ s|%TEIL%|${teil}|g
+ s|%TEIL-BASE%|${teil##*/}|g
+ s|%IF \([^=]\+\)=\1%||g
+ /%IF [^=]\+=[^=]\+%/d
+ "
+ done
+ unset loopLines
+ fi
+ echo "${line}"
+ fi
+ done > alles.pre
+
+lilypond alles.pre