acmecert: Handle application/problem responses better.
[utils.git] / latexps
... / ...
CommitLineData
1#!/bin/sh
2
3set -e
4
5inf=-
6ouf=-
7
8dir="$(mktemp -d /tmp/latex.XXXXXX)"
9trap 'rm -r "$dir"' EXIT
10
11cat "$inf" >"$dir/file.tex"
12
13for pass in 1 2; do
14 (cd "$dir"; latex file.tex >&2)
15done
16
17(cd "$dir"; dvips file)
18
19if [ "$ouf" = - ]; then
20 cat "$dir/file.ps"
21else
22 cat "$dir/file.ps" >"$ouf"
23fi