summaryrefslogtreecommitdiff
path: root/Konzerte/2018_01_07/make
diff options
context:
space:
mode:
Diffstat (limited to 'Konzerte/2018_01_07/make')
-rwxr-xr-xKonzerte/2018_01_07/make49
1 files changed, 27 insertions, 22 deletions
diff --git a/Konzerte/2018_01_07/make b/Konzerte/2018_01_07/make
index 925be5a..4cba25b 100755
--- a/Konzerte/2018_01_07/make
+++ b/Konzerte/2018_01_07/make
@@ -38,29 +38,34 @@ do
)
done
-while read -r line
-do
- if [[ "${line}" = '%LOOP%'* ]]
- then
- loopLines="${loopLines}
-${line#%LOOP%}"
- else
- if [ -n "${loopLines}" ]
+{
+ printf '\n\n'
+ cat alles.ly
+ printf '\n\n'
+} | \
+ while read -r line
+ do
+ if [[ "${line}" = '%LOOP%'* ]]
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
+ 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
- echo "${line}"
- fi
-done < alles.ly > alles.pre
+ done > alles.pre
lilypond alles.pre