#!/bin/sh # # Build the Booke. First assemble the book LaTeX, then build it # into a PDF. # if [ $# != 1 ]; then echo "Usage: make.sh " exit 1 fi booke=$1 output=dottes.tex cp dottes.tex.header $output # Now, for each tune, add # # \addcontentsline{toc}{subsection}{} # \begin{abc}[name=] # ... ABC ... # \end{abc} find $booke -name "*.abc" | sort | while read filename do title=`grep "^T:" $filename | sed -e "s/^T: *//"` name=`basename $filename .abc` echo "\\\\addcontentsline{toc}{subsection}{$title}" >> $output echo "\\\\begin{abc}[name=$name]" >> $output cat $filename >> $output echo "\\\\end{abc}" >> $output done echo "\\\\end{document}" >> $output #pdflatex -shell-escape $output #pdflatex -shell-escape $output