From 59af4f65ba152a72f698ea874db3ee094055549a Mon Sep 17 00:00:00 2001 From: Cheng XU Date: Wed, 24 May 2023 14:34:13 -0700 Subject: [PATCH] setup.sh: use curl instead of wget --- setup.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.sh b/setup.sh index 182c5a5..9198d51 100755 --- a/setup.sh +++ b/setup.sh @@ -27,6 +27,7 @@ retry() { echo "==> Install system packages" apk --no-cache add \ bash \ + curl \ fontconfig \ ghostscript \ gnupg \ @@ -53,10 +54,10 @@ apk --no-cache add \ echo "==> Install TeXLive" mkdir -p /tmp/install-tl cd /tmp/install-tl -MIRROR_URL="$(wget -q -S -O /dev/null http://mirror.ctan.org/ 2>&1 | sed -ne 's/.*Location: \(\w*\)/\1/p' | head -n 1)" -wget -nv "${MIRROR_URL}systems/texlive/tlnet/install-tl-unx.tar.gz" -wget -nv "${MIRROR_URL}systems/texlive/tlnet/install-tl-unx.tar.gz.sha512" -wget -nv "${MIRROR_URL}systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc" +MIRROR_URL="$(curl -w "%{redirect_url}" -o /dev/null -s http://mirror.ctan.org/)" +curl -OL "${MIRROR_URL}systems/texlive/tlnet/install-tl-unx.tar.gz" +curl -OL "${MIRROR_URL}systems/texlive/tlnet/install-tl-unx.tar.gz.sha512" +curl -OL "${MIRROR_URL}systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc" gpg --no-default-keyring --keyring trustedkeys.kbx --import /texlive_pgp_keys.asc gpgv ./install-tl-unx.tar.gz.sha512.asc ./install-tl-unx.tar.gz.sha512 sha512sum -c ./install-tl-unx.tar.gz.sha512