www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 50c27f41a5d6ec1b40d4676a8d871e83906125be
parent 0851cc36697ce6ef0b1bbcc8c0c4ac238226e316
Author: Suzanne Soy <jsmaniac.github@suzanne.soy>
Date:   Tue,  6 Jul 2021 05:12:12 +0100

Dump the faulty .tex file on error

Diffstat:
MMakefile | 3++-
Apdflatex-wrapper/pdflatex | 9+++++++++
2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -2,6 +2,7 @@ all: doc/pdf/phc-thesis.pdf doc/pdf/phc-thesis.pdf: from-dissertation-tobin-hochstadt/*.scrbl scribblings/*.scrbl scribblings/*.rkt - raco setup --doc-pdf doc/pdf/ --pkgs phc-thesis > pdf.log 2>&1 || (cat pdf.log && exit 1) + sed -i -e 's|PLACEHOLDER|$$(which pdflatex)|' pdflatex-wrapper/pdflatex + PATH="$PWD/pdflatex-wrapper:$PATH" raco setup --doc-pdf doc/pdf/ --pkgs phc-thesis > pdf.log 2>&1 || (cat pdf.log && echo "=== plain ===" && cat /tmp/ltx/*.tex && echo "=== base64 ===" && base64 /tmp/ltx/*.tex && echo "=== end ===" && exit 1) gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dFastWebView=true -sOutputFile=doc/pdf/phc-thesis-linearized.pdf doc/pdf/phc-thesis.pdf mv doc/pdf/phc-thesis-linearized.pdf doc/pdf/phc-thesis.pdf diff --git a/pdflatex-wrapper/pdflatex b/pdflatex-wrapper/pdflatex @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +echo "=== pdflatex $@ ===" +pwd +ls +mkdir /tmp/ltx +for arg in "$@"; do if test -e "$arg"; then cp "$arg" /tmp/ltx/ +echo "=== starting pdflatex ===" +exec PLACEHOLDER "$@"