changeset 675:7ad6c0aa958d build-default-267

Strip any '-<instrument>' from section name for booke text.
author Jim Hague <jim.hague@acm.org>
date Thu, 14 Sep 2017 13:14:28 +0100
parents 49d72092b45e
children 6714a7e36313
files makeBooke.sh
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/makeBooke.sh	Thu Sep 14 13:14:00 2017 +0100
+++ b/makeBooke.sh	Thu Sep 14 13:14:28 2017 +0100
@@ -56,6 +56,8 @@
 while [ $# -gt 0 ]
 do
     section=$dir/$1
+    # Section name - strip any instrument name off the end.
+    sectionname=${1/-*/}
 
     for item in title subtitle instrument
     do
@@ -76,8 +78,8 @@
         fi
     done
 
-    sed -e "s/@SECTION@/$1/" dottes.tex.section-tunes >> $builddir/tunes.tex
-    sed -e "s/@SECTION@/$1/" dottes.tex.section-firstlines >> $builddir/firstlines.tex
+    sed -e "s/@SECTION@/$sectionname/" dottes.tex.section-tunes >> $builddir/tunes.tex
+    sed -e "s/@SECTION@/$sectionname/" dottes.tex.section-firstlines >> $builddir/firstlines.tex
 
     shift
 done