From 0ec8a3dd7cbc3992a09ae1ec151f412eaf6340cb Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 9 Mar 2018 08:58:48 +0100 Subject: Konzerte/2018_04_15 neu --- Konzerte/2018_04_15/make | 64 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 Konzerte/2018_04_15/make (limited to 'Konzerte/2018_04_15/make') 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 -- cgit v1.2.3-70-g09d2