From 17021417d579be9d58f4609271329c6eb3ff3704 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 14 Jun 2018 23:22:55 +0200 Subject: Konzerte/2018_07_28 angefangen --- Konzerte/2018_07_28/alles.ly | 9 ++++++ Konzerte/2018_07_28/make | 65 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 Konzerte/2018_07_28/alles.ly create mode 100755 Konzerte/2018_07_28/make diff --git a/Konzerte/2018_07_28/alles.ly b/Konzerte/2018_07_28/alles.ly new file mode 100644 index 0000000..bc4c998 --- /dev/null +++ b/Konzerte/2018_07_28/alles.ly @@ -0,0 +1,9 @@ +\version "2.19.80" +\paper { + first-page-number = #2 + print-first-page-number = ##t +} + +%LOOP%\include "../../%TEIL%/%TEIL-BASE%.pre" +%LOOP%%IF '%TEIL-BASE%'='Vertraut_den_neuen_Wegen'%\pageBreak +%LOOP%%IF '%TEIL-BASE%'='Ueber_dir_wach_ein_Engel'%\pageBreak diff --git a/Konzerte/2018_07_28/make b/Konzerte/2018_07_28/make new file mode 100755 index 0000000..58be975 --- /dev/null +++ b/Konzerte/2018_07_28/make @@ -0,0 +1,65 @@ +#!/bin/bash + +set -e + +cd "$(dirname "$0")" + +teile=( + In_dieser_lieben_Sommerzeit + Ins_Wasser_faellt_ein_Stein + Da_beruehren_sich_Himmel_und_Erde + Gott_hat_mir_laengst_einen_Engel_gesandt +# Wir_wuenschen_dass_jedes_Kind_lachen_kann + Als_Gott_die_Welt_erschaffen + Kanons/Du_bist_mein_ich_bin_dein +) + +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