comparison makeGraphics.sh @ 42:0e7d2830cb8b

Put making tune graphics required by web and book into separate dir and make separately. Web and book both require the tune PDF graphics. Break these out into a separate direction and make with a separate process.
author Jim Hague <jim.hague@laicatc.com>
date Sun, 04 Mar 2012 12:00:30 +0000
parents
children e666306c5ab1
comparison
equal deleted inserted replaced
41:62da0abc23d8 42:0e7d2830cb8b
1 #!/bin/bash
2 #
3 # Make the tune graphics, EPS, PDF required by web and book into
4 # graphics/<book>.
5 #
6
7 if [ $# != 1 ]; then
8 echo "Usage: makeGraphics.sh <book dir name>"
9 exit 1
10 fi
11
12 dir=`pwd`
13
14 booke=$dir/$1
15 graphicsdir=$dir/graphics/$1
16
17 mkdir -p $graphicsdir
18
19 # Now, for each tune, make the tune graphic.
20 find $booke -name "*.abc" | sort |
21 while read filename
22 do
23 name=`basename $filename .abc`
24 abcm2ps -j0 +c -n -E -O $graphicsdir/$name.eps $filename
25 # Make $name.eps so we can build with LaTeX.
26 mv $graphicsdir/${name}001.eps $graphicsdir/${name}.eps
27 # And make the corresponding PDF for pdflatex.
28 epstopdf --outfile=$graphicsdir/$name.pdf $graphicsdir/${name}.eps
29 done