comparison makeBooke.sh @ 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 d5357ee6b4b2
children b45a87f4ccdb
comparison
equal deleted inserted replaced
674:49d72092b45e 675:7ad6c0aa958d
54 rm -f $builddir/firstlines.tex 54 rm -f $builddir/firstlines.tex
55 55
56 while [ $# -gt 0 ] 56 while [ $# -gt 0 ]
57 do 57 do
58 section=$dir/$1 58 section=$dir/$1
59 # Section name - strip any instrument name off the end.
60 sectionname=${1/-*/}
59 61
60 for item in title subtitle instrument 62 for item in title subtitle instrument
61 do 63 do
62 rm -f $builddir/$1-$item.txt 64 rm -f $builddir/$1-$item.txt
63 if [ -r $section/$item.txt ]; then 65 if [ -r $section/$item.txt ]; then
74 else 76 else
75 touch $builddir/$1-$item.tex 77 touch $builddir/$1-$item.tex
76 fi 78 fi
77 done 79 done
78 80
79 sed -e "s/@SECTION@/$1/" dottes.tex.section-tunes >> $builddir/tunes.tex 81 sed -e "s/@SECTION@/$sectionname/" dottes.tex.section-tunes >> $builddir/tunes.tex
80 sed -e "s/@SECTION@/$1/" dottes.tex.section-firstlines >> $builddir/firstlines.tex 82 sed -e "s/@SECTION@/$sectionname/" dottes.tex.section-firstlines >> $builddir/firstlines.tex
81 83
82 shift 84 shift
83 done 85 done
84 86
85 for filename in $dir/*.${papersize}.tex 87 for filename in $dir/*.${papersize}.tex