From 79b33ae3b0089c55e2d4b4ccf2a5a1f4cae8caae Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Thu, 20 Mar 2025 16:37:49 +0800 Subject: [PATCH] llvm-apt: follow redirection when fetch codenames --- llvm-apt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm-apt.sh b/llvm-apt.sh index d879a48..39d6194 100755 --- a/llvm-apt.sh +++ b/llvm-apt.sh @@ -13,7 +13,7 @@ export REPO_SIZE_FILE=/tmp/reposize.$RANDOM function get_codenames() { local os=$1 local dist_meta_url="${BASE_URL}/${os}/conf/distributions" - local codenames=$(curl -s $dist_meta_url 2>/dev/null | grep -oP '^Codename: \K.*' | tr '\n' ',' | sed 's/,$//') + local codenames=$(curl -sSfL $dist_meta_url 2>/dev/null | grep -oP '^Codename: \K.*' | tr '\n' ',' | sed 's/,$//') if [ -z "$codenames" ]; then echo "Unable to fetch codename from $dist_meta_url, using default" >&2 prefix=llvm-toolchain-$os