util/crossgcc: Retry package downloads on failure
For whatever reason, I've had buildgcc fail to download packages a number of times. Adding 2 additional retries before failing helps with that problem. Signed-off-by: Martin Roth <martin@coreboot.org> Change-Id: I060eaa5a0da955436169e2199c1c62044dcfd5ea Reviewed-on: https://review.coreboot.org/c/coreboot/+/47338 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
b37f2e9902
commit
82a30a134c
|
@ -1057,7 +1057,7 @@ if searchtool wget "GNU" nofail > /dev/null; then
|
||||||
download_showing_percentage() {
|
download_showing_percentage() {
|
||||||
url=$1
|
url=$1
|
||||||
printf "... ${red} 0%%"
|
printf "... ${red} 0%%"
|
||||||
wget "$url" 2>&1 | while read -r line; do
|
wget --tries=3 "$url" 2>&1 | while read -r line; do
|
||||||
echo "$line" | grep -o "[0-9]\+%" | awk '{printf("\b\b\b\b%4s", $1)}'
|
echo "$line" | grep -o "[0-9]\+%" | awk '{printf("\b\b\b\b%4s", $1)}'
|
||||||
done
|
done
|
||||||
printf "${NC}... "
|
printf "${NC}... "
|
||||||
|
@ -1066,7 +1066,7 @@ elif searchtool curl "^curl " > /dev/null; then
|
||||||
download_showing_percentage() {
|
download_showing_percentage() {
|
||||||
url=$1
|
url=$1
|
||||||
echo
|
echo
|
||||||
curl -#OL "$url"
|
curl --progress-bar --location --retry 3 "$url"
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue