Skip to content

Commit

Permalink
fix(latex): Dockerfile worked for archival TeXLive but not current
Browse files Browse the repository at this point in the history
Signed-off-by: John Muchovej <[email protected]>
  • Loading branch information
jmuchovej committed Sep 9, 2024
1 parent d7cceff commit fe38e53
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions images/src/latex/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ ARG TEXDIR="/usr/local/texlive"
ARG TEXUSERDIR="/texlive-user"

ARG CHKTEX_MIRROR="http://download.savannah.gnu.org/releases/chktex"
ARG TEXLIVE_MIRROR="https://ftp.math.utah.edu/pub/tex/historic/systems/texlive"
ARG TEXLIVE_MIRROR="https://ftp.math.utah.edu/pub"
ARG TEXLIVE_MIRROR="${TEXLIVE_MIRROR}/tex/historic/systems/texlive/${TEXLIVE_VERSION}"

ARG SCHEME="scheme-basic"
ARG DOCFILES=0
Expand Down Expand Up @@ -85,20 +86,23 @@ EOF
ENV TEXLIVE_INSTALL_NO_WELCOME=1
ENV TEXLIVE_INSTALL_NO_CONTEXT_CACHE=1

RUN <<-EOF
path="$([ "$(date +%Y)" != "${TEXLIVE_VERSION}" ] && echo "${TEXLIVE_VERSION}/tlnet-final" || echo "${TEXLIVE_VERSION}")"
curl -qfL -o- "${TEXLIVE_MIRROR}/${path}/install-tl-unx.tar.gz" \
| tar xz --strip-components=1
RUN curl -qfL -o- "${TEXLIVE_MIRROR}/install-tl-unx.tar.gz" | tar xz --strip-components=1

#! This prevents the `COPY --from=texlive-builder ...` directives from failing.
mkdir -p "${TEXDIR}" "${TEXUSERDIR}"
EOF
RUN mkdir -p "${TEXDIR}" "${TEXUSERDIR}"

RUN <<-EOF
path="$([ "$(date +%Y)" != "${TEXLIVE_VERSION}" ] && echo "${TEXLIVE_VERSION}/tlnet-final" || echo "${TEXLIVE_VERSION}")"
./install-tl --no-interaction --texdir ${TEXDIR} --texuserdir ${TEXUSERDIR} \
-profile /tmp/texlive/profile.txt \
-repository "${TEXLIVE_MIRROR}/${path}"
tl_args=(
"--no-interaction"
"--texdir" "${TEXDIR}"
"--texuserdir" "${TEXUSERDIR}"
"--profile" "/tmp/texlive/profile.txt"
)
#* We only need the remote repository when installing older versions of TeXLive
if [ "${TEXLIVE_VERSION}" != "$(date +%Y)" ]; then
tl_args+=("--repository" "${TEXLIVE_MIRROR}/tlnet-final")
fi
./install-tl "${tl_args[@]}"
EOF
#endregion ##############################################################################

Expand Down

0 comments on commit fe38e53

Please sign in to comment.