Infrastructure to generate PDF figures for the paper
[bluesky.git] / results / figures / build.sh
1 #!/bin/bash
2
3 for f in *.gnuplot; do
4     [ "$f" = "common.gnuplot" ] && continue
5     echo "gnuplot: $f"
6     gnuplot $f
7 done
8
9 for f in *.eps; do
10     echo "epstopdf: $f"
11
12     # Strip out PDF metadata which includes identifying usernames
13     sed -e $'/^SDict begin/,/^end/ {\n  /^  \/.*(/d\n}' \
14         -e '/^%%\(Title\|CreationDate\)/d' <$f >$f.tmp
15
16     epstopdf --noembed --outfile=${f%.eps}.pdf $f.tmp
17     rm $f $f.tmp
18 done