Skip to content

Commit c6c7288

Browse files
committed
allow custom TEXLIVE_MIRROR
1 parent 34b5e0f commit c6c7288

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

data/r-session-complete/scripts/install-texlive.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
#!/bin/bash
22

3-
# Install TeXlive
3+
# Install TeXlive
4+
# Optionally set TEXLIVE_MIRROR to a CTAN mirror URL
5+
# (e.g. https://mirror.example.org/CTAN/systems/texlive/tlnet)
6+
# If unset, the default CTAN mirror redirector is used.
7+
8+
MIRROR_OPT=${TEXLIVE_MIRROR:+--repository ${TEXLIVE_MIRROR}}
49

510
curl -LO https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz && \
611
tar xvfz install-tl-unx.tar.gz && \
712
rm install-tl-unx.tar.gz && \
813
cd install-tl-* && \
9-
./install-tl --scheme small --no-interaction #--repository ftp://tug.org/historic/systems/texlive/${TEXLIVE_VERSION}/tlnet-final
14+
./install-tl --scheme small --no-interaction ${MIRROR_OPT}
1015

1116
TEXLIVE_VERSION=`ls /usr/local/texlive/ | grep [0-9]`
1217

@@ -34,5 +39,10 @@ fi
3439
WRAPPER
3540
chmod +x /usr/local/bin/tlmgr
3641

42+
# Pin tlmgr to the same mirror if one was specified
43+
if [ -n "${TEXLIVE_MIRROR}" ]; then
44+
/usr/local/texlive/${TEXLIVE_VERSION}/bin/x86_64-linux/tlmgr option repository ${TEXLIVE_MIRROR}
45+
fi
46+
3747
# Install texliveonfly so it can help with auto-install missing packages
3848
/usr/local/texlive/${TEXLIVE_VERSION}/bin/x86_64-linux/tlmgr install texliveonfly

0 commit comments

Comments
 (0)