Cache creation improvements (#2806)

This commit is contained in:
Igor Pečovnik
2021-05-05 20:49:25 +02:00
committed by GitHub
parent f43db66d32
commit d3997fe64c
2 changed files with 29 additions and 14 deletions

View File

@@ -525,12 +525,14 @@ if [[ $DOWNLOAD_MIRROR == "bfsu" ]] ; then
fi
# don't use mirrors that throws garbage on 404
while true; do
if [[ -z ${ARMBIAN_MIRROR} ]]; then
while true; do
ARMBIAN_MIRROR=$(wget -SO- -T 1 -t 1 https://redirect.armbian.com 2>&1 | egrep -i "Location" | awk '{print $2}' | head -1)
[[ ${ARMBIAN_MIRROR} != *armbian.hosthatch* ]] && break
ARMBIAN_MIRROR=$(wget -SO- -T 1 -t 1 https://redirect.armbian.com 2>&1 | egrep -i "Location" | awk '{print $2}' | head -1)
[[ ${ARMBIAN_MIRROR} != *armbian.hosthatch* ]] && break
done
done
fi
# For user override
if [[ -f $USERPATCHES_PATH/lib.config ]]; then