#!/bin/bash
tmpdir=$(mktemp -d)
pdflatex -output-directory="$tmpdir" "$1"
mv "$tmpdir"/*.pdf .
rm -rf "$tmpdir"