Files
docker/latex/entrypoint.sh
Janis Hutz a74595f968
All checks were successful
Create and publish container / build_container (push) Successful in 16s
Update entrypoint script logging
2025-12-23 08:00:22 +01:00

35 lines
690 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
echo "Setting workdir from current dir, which is $(pwd)"
if [ -n "$WORKDIR" ]; then
cd "$WORKDIR"
fi
echo "latexmk with extra args $EXTRA_ARGS"
latexmk -pdf -latexoption=-file-line-error -latexoption=-interaction=nonstopmode $EXTRA_ARGS