Improve compile logs

This commit is contained in:
2026-01-09 13:32:18 +01:00
parent 10503b4b97
commit 5b6f13ee80

View File

@@ -20,16 +20,31 @@ if [ -n "$INSTALL_HELPERS" ]; then
mkdir ~/projects/ || true mkdir ~/projects/ || true
cd ~/projects/ cd ~/projects/
git clone https://git.janishutz.com/janishutz/latex || true git clone https://git.janishutz.com/janishutz/latex || true
echo "Downloaded helpers, returning to $CURR_DIR" echo "
Downloaded helpers, returning to $CURR_DIR
"
cd "$CURR_DIR" cd "$CURR_DIR"
fi fi
fi fi
echo "Setting workdir from current dir, which is $(pwd)" echo "
Setting workdir from current dir, which is $(pwd)
"
if [ -n "$WORKDIR" ]; then if [ -n "$WORKDIR" ]; then
cd "$WORKDIR" cd "$WORKDIR"
fi fi
echo "latexmk with extra args $EXTRA_ARGS" echo "
Compiling document using latexmk with extra arguments: $EXTRA_ARGS
"
latexmk -pdf -latexoption=-file-line-error -latexoption=-interaction=nonstopmode -shell-escape $EXTRA_ARGS latexmk -pdf -latexoption=-file-line-error -latexoption=-interaction=nonstopmode -shell-escape $EXTRA_ARGS > /tmp/log.txt
if [ $? != 0 ]; then
cat /tmp/log.txt
echo "
==> Compile has failed. See log above
"
else
echo "Compile successful, log omitted"
fi