1 2 3 4 5 6 7
#!/bin/bash set -e filename=${1:-report} latexmk -pdf -outdir=out -shell-escape "$filename" </dev/null mv "out/$filename.pdf" .