diff --git a/latex/entrypoint.sh b/latex/entrypoint.sh index f89b2a4..bfd3423 100755 --- a/latex/entrypoint.sh +++ b/latex/entrypoint.sh @@ -3,22 +3,31 @@ set -e WORKDIR="$1" -EXTRA_ARGS="$2" -EXTRA_PKGS="$3" +INSTALL_HELPERS="$2" +EXTRA_ARGS="$3" +EXTRA_PKGS="$4" if [ -n "$EXTRA_PKGS" ]; then for pkg in $EXTRA_PKGS; do - echo "Install $pkg by apk" + 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 -ls - echo "Runner started, will run latexmk with extra args $EXTRA_ARGS" latexmk -pdf -latexoption=-file-line-error -latexoption=-interaction=nonstopmode $EXTRA_ARGS