A fix to the documentation makefile from John D. Mitchell.
[ragel.git] / doc / genfigs.sh
blob8d521075edf9d0efc26e6c1f8faba1a12e441f67
1 #!/bin/bash
4 input=ragel-guide.tex
6 for fig; do
7 if awk -f extract.awk -vexname=$fig $input > /dev/null; then
8 echo generating ${fig}.dot
9 opt=`awk -f extract.awk -vexname=$fig $input |
10 sed '/^ *OPT:/s/^.*: *//p;d'`
11 awk -f extract.awk -vexname=$fig $input > ${fig}.rl
12 ../ragel/ragel -V -p ${fig}.rl > ${fig}.dot
13 else
14 echo "$0: internal error: figure $fig not found in $input" >&2
15 exit 1
17 done