-
Notifications
You must be signed in to change notification settings - Fork 0
/
update-docker.sh
45 lines (37 loc) · 1.26 KB
/
update-docker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
# Exit immediately if command nonzero
set -eu
# Desired profile for container
TARGET_PROFILE="$1"
echo "Running update for target-profile \"${TARGET_PROFILE}\""
echo "Update sltx"
pip install --upgrade sltx
sltx -t1 dependency /sltx-dep.yaml
sltx cls --cache
echo "Rerun of updmap & mktexfmt"
updmap -sys
mktexfmt pdflatex.fmt
mktexfmt latex.fmt
# update/install additional packages, if present
PROFILE_AD="/profiles/${TARGET_PROFILE}.sh"
if [ -f "${PROFILE_AD}" ]; then
echo "Running profile specific post-install script: \"${PROFILE_AD}\" (bash)"
bash ${PROFILE_AD}
fi
echo "Cleaning up afterwards to get a smaller container"
# We clean doc and source to, if some profile wants to install them anyway
rm -rf \
/opt/texlive/texdir/install-tl /opt/texlive/texdir/install-tl.log \
/opt/texlive/texdir/texmf-dist/doc /opt/texlive/texdir/texmf-dist/source \
/opt/texlive/texdir/texmf-var/web2c/tlmgr.log \
/root/.gnupg \
/update-docker.sh \
/opt/texlive/texdir/texmf-var/web2c/updmap.log \
/opt/texlive/texdir/texmf-var/web2c/tlmgr-commands.log \
/root/texlive/texmf-var/web2c/pdftex/latex.log \
/root/texlive/texmf-var/web2c/pdftex/pdflatex.log \
/profiles/ \
/sltx-dep.yaml \
/sltx-drivers.log \
/var/cache/apk/*
echo "Setup completed!"