summaryrefslogtreecommitdiff
path: root/Konzerte/2018_05_13/make
diff options
context:
space:
mode:
Diffstat (limited to 'Konzerte/2018_05_13/make')
-rwxr-xr-xKonzerte/2018_05_13/make73
1 files changed, 73 insertions, 0 deletions
diff --git a/Konzerte/2018_05_13/make b/Konzerte/2018_05_13/make
new file mode 100755
index 0000000..3ac9842
--- /dev/null
+++ b/Konzerte/2018_05_13/make
@@ -0,0 +1,73 @@
+#!/bin/bash
+
+set -e
+
+cd "$(dirname "$0")"
+
+teile=(
+ Kyrie
+ Halleluja
+ Befiehl_dem_Herren_deine_Wege
+# Die_beste_Zeit_im_Jahr_ist_mein # EG319 1-4
+ Die_beste_Zeit_im_Jahr_ist_mein
+ Aennchen_von_Tharau
+ Im_Fruehling
+ Wie_lieblich_ist_der_Maien # EG501
+ Ich_sing_dir_mein_Lied
+ Denn_er_hat_seinen_Engeln_
+ Ueber_dir_wach_ein_Engel
+# Vespergesang # FEHLT!
+ Hoere_nun_Herr_die_Bitten
+ Schoen_ist_die_Erde
+ Viele_verachten_die_edele_Musik
+)
+
+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