Files
docker/latex/entrypoint.sh
Janis Hutz 3608fe6687
Some checks failed
Create and publish container / build_container (push) Failing after 15s
Syntax fixes
2025-12-23 07:48:36 +01:00

34 lines
658 B
Bash
Executable File

#!/bin/sh
set -e
WORKDIR="$1"
INSTALL_HELPERS="$2"
EXTRA_ARGS="$3"
EXTRA_PKGS="$4"
if [ -n "$EXTRA_PKGS" ]; then
for pkg in $EXTRA_PKGS; do
echo "Install $pkg with apk"
apk add "$pkg"
done
fi
if [ -n "$INSTALL_HELPERS" ]; then
if [ "$INSTALL_HELPERS" == "true" ]; then
CURR_DIR=$(pwd)
mkdir ~/projects/
cd ~/projects/
git clone https://git.janishutz.com/janishutz/latex
cd "$CURR_DIR"
fi
fi
if [ -n "$WORKDIR" ]; then
cd "$WORKDIR"
fi
echo "Runner started, will run latexmk with extra args $EXTRA_ARGS"
latexmk -pdf -latexoption=-file-line-error -latexoption=-interaction=nonstopmode $EXTRA_ARGS