diff options
Diffstat (limited to 'manual/presentation.sh')
-rwxr-xr-x | manual/presentation.sh | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/manual/presentation.sh b/manual/presentation.sh new file mode 100755 index 000000000..3a55b9391 --- /dev/null +++ b/manual/presentation.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +fast_mode=false + +set -- $(getopt fu "$@") +while [ $# -gt 0 ]; do + case "$1" in + -f) + fast_mode=true + ;; + --) + shift + break + ;; + -*) + echo "$0: error - unrecognized option $1" 1>&2 + exit 1 + ;; + *) + break + esac + shift +done + +PDFTEX_OPT="-shell-escape -halt-on-error" + +if ! $fast_mode; then + md5sum *.aux *.snm *.nav *.toc > autoloop.old +fi + +set -ex + +pdflatex $PDFTEX_OPT presentation.tex + +if ! $fast_mode; then + while + md5sum *.aux *.snm *.nav *.toc > autoloop.new + ! cmp autoloop.old autoloop.new + do + cp autoloop.new autoloop.old + pdflatex $PDFTEX_OPT presentation.tex + done + + rm -f autoloop.old + rm -f autoloop.new +fi + |