File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -377,7 +377,20 @@ function get_stage3_archive_regex() {
377
377
function fetch_stage3_archive_name() {
378
378
__fetch_stage3_archive_name=
379
379
ARCH=" ${ARCH:- amd64} "
380
- ARCH_URL=" ${ARCH_URL:- ${MIRROR} releases/ ${ARCH} / autobuilds/ current-${STAGE3_BASE} / } "
380
+ local mirrors_split mirror stage3_url stage3_path
381
+ if [ -z " ${ARCH_URL} " ]; then
382
+ stage3_path=" /releases/${ARCH} /autobuilds/current-${STAGE3_BASE} /"
383
+ read -ra mirrors_split <<< " ${MIRROR}"
384
+ for mirror in " ${mirrors_split[@]} " ; do
385
+ stage3_url=" ${mirror}${stage3_path} "
386
+ if wget --spider " ${stage3_url} " 2> /dev/null; then
387
+ ARCH_URL=" ${stage3_url} "
388
+ break ;
389
+ fi
390
+ done
391
+ fi
392
+ [[ -z " ${ARCH_URL} " ]] && die " Could not find stage3 location on mirror(s): ${MIRROR} with url path: ${stage3_path} "
393
+
381
394
local remote_files remote_line remote_date remote_file_type max_cap
382
395
readarray -t remote_files <<< " $(wget -qO- " ${ARCH_URL} " )"
383
396
remote_date=0
You can’t perform that action at this time.
0 commit comments