mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-06-30 23:12:45 +00:00
llvm-apt: follow redirection when fetch codenames
This commit is contained in:
parent
d5e564ff48
commit
79b33ae3b0
@ -13,7 +13,7 @@ export REPO_SIZE_FILE=/tmp/reposize.$RANDOM
|
|||||||
function get_codenames() {
|
function get_codenames() {
|
||||||
local os=$1
|
local os=$1
|
||||||
local dist_meta_url="${BASE_URL}/${os}/conf/distributions"
|
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
|
if [ -z "$codenames" ]; then
|
||||||
echo "Unable to fetch codename from $dist_meta_url, using default" >&2
|
echo "Unable to fetch codename from $dist_meta_url, using default" >&2
|
||||||
prefix=llvm-toolchain-$os
|
prefix=llvm-toolchain-$os
|
||||||
|
Loading…
x
Reference in New Issue
Block a user