Mercurial > dottes
comparison makeBooke.sh @ 266:06e140f48543
Revise scripts for building printed Bookes.
A lot of stuff was being duplicated between different page size. Consolidate where
possible, and in particular put as much into a single source file (dottes.tex) as
possible. Making a single Booke is now potentially quicker, as the tune pages
don't necessarily have to be regenerate every time.
author | Jim Hague <jim.hague@acm.org> |
---|---|
date | Wed, 26 Jun 2013 23:37:45 +0100 |
parents | |
children | 9c5cabaabbec |
comparison
equal
deleted
inserted
replaced
265:3e5335396f48 | 266:06e140f48543 |
---|---|
1 #!/bin/bash | |
2 # | |
3 # Build the Booke. Move subfiles into place and build the Booke into a PDF. | |
4 # | |
5 # The Booke tune content and all EPS and PDF tune graphics must be | |
6 # present already. Run makeGraphics.sh first and then | |
7 # makeBookeTunePages.sh. | |
8 # | |
9 | |
10 if [ $# != 2 ]; then | |
11 echo "Usage: makeBooke.sh <book dir name> <A4|A5>" | |
12 exit 1 | |
13 fi | |
14 | |
15 dir=`pwd` | |
16 | |
17 booke=$dir/$1 | |
18 papersize=$2 | |
19 builddir=$dir/build | |
20 graphicsdir=$dir/graphics/$1 | |
21 booketex=$dir/dottes.tex | |
22 bookepdf=$builddir/dottes.pdf | |
23 | |
24 mkdir -p $builddir | |
25 | |
26 cp dottes.tex $builddir | |
27 cp buildno.txt $builddir | |
28 cp buzzard.eps $builddir | |
29 for item in title subtitle intro instrument | |
30 do | |
31 rm -f $builddir/$item.txt | |
32 if [ -r $booke/$item.txt ]; then | |
33 cp $booke/$item.txt $builddir | |
34 else | |
35 touch $builddir/$item.txt | |
36 fi | |
37 done | |
38 | |
39 for filename in $dir/*.${papersize}.tex | |
40 do | |
41 name=`basename $filename .${papersize}.tex` | |
42 cp $filename $builddir/$name.tex | |
43 done | |
44 | |
45 cd $builddir | |
46 | |
47 xelatex $booketex | |
48 xelatex $booketex | |
49 xelatex $booketex | |
50 | |
51 mv $bookepdf $dir/$1-${papersize}.pdf | |
52 | |
53 cd $dir |