1 2 3 4 5 6 7 8
#!/bin/sh -eu if ! { pdflatex -halt-on-error "$1" \ || xelatex -halt-on-error "$1"; } then cat fi