8 which pdflatex &> /dev/null || die "you must have pdflatex installed"
10 [ $# -eq 1 ] || die "you must give exactly one argument: the \
11 name of the tex file to use as input."
13 TMPDIR=`mktemp -d -t pdfgrep.XXXXXXXXXX` || exit 1
14 trap "rm -rf ${TMPDIR}; exit" INT TERM EXIT
18 pdflatex -output-directory "${TMPDIR}" < "${INPUT_FNAME}" || die "ERROR: pdflatex failed!"
19 mv -f ${TMPDIR}/*.pdf "${INPUT_FNAME}.pdf" || die "ERROR: couldn't find pdf output file"