Mercurial > dottes
annotate makeBooke.sh @ 327:55afb58d4a9a
Make emails \url{} to that they will wrap at the end of a line.
Also remove unused reference to graphics dir.
author | Jim Hague <jim.hague@acm.org> |
---|---|
date | Mon, 05 Aug 2013 13:30:08 +0100 |
parents | 9c5cabaabbec |
children | 2a7d03d6a89f |
rev | line source |
---|---|
266
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
1 #!/bin/bash |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
2 # |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
3 # Build the Booke. Move subfiles into place and build the Booke into a PDF. |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
4 # |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
5 # The Booke tune content and all EPS and PDF tune graphics must be |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
6 # present already. Run makeGraphics.sh first and then |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
7 # makeBookeTunePages.sh. |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
8 # |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
9 |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
10 if [ $# != 2 ]; then |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
11 echo "Usage: makeBooke.sh <book dir name> <A4|A5>" |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
12 exit 1 |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
13 fi |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
14 |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
15 dir=`pwd` |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
16 |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
17 booke=$dir/$1 |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
18 papersize=$2 |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
19 builddir=$dir/build |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
20 booketex=$dir/dottes.tex |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
21 bookepdf=$builddir/dottes.pdf |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
22 |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
23 mkdir -p $builddir |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
24 |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
25 cp dottes.tex $builddir |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
26 cp buildno.txt $builddir |
304
9c5cabaabbec
Replace buzzard EPS with cropped PDF.
Jim Hague <jim.hague@acm.org>
parents:
266
diff
changeset
|
27 cp buzzard.pdf $builddir |
266
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
28 for item in title subtitle intro instrument |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
29 do |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
30 rm -f $builddir/$item.txt |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
31 if [ -r $booke/$item.txt ]; then |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
32 cp $booke/$item.txt $builddir |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
33 else |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
34 touch $builddir/$item.txt |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
35 fi |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
36 done |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
37 |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
38 for filename in $dir/*.${papersize}.tex |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
39 do |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
40 name=`basename $filename .${papersize}.tex` |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
41 cp $filename $builddir/$name.tex |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
42 done |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
43 |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
44 cd $builddir |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
45 |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
46 xelatex $booketex |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
47 xelatex $booketex |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
48 xelatex $booketex |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
49 |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
50 mv $bookepdf $dir/$1-${papersize}.pdf |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
51 |
06e140f48543
Revise scripts for building printed Bookes.
Jim Hague <jim.hague@acm.org>
parents:
diff
changeset
|
52 cd $dir |