blob: 1b5d67cf5d750fb40f6a4ce20fc873854570342b (
plain) (
tree)
|
|
#!/bin/ash
download() {
curl --location --max-redirs 5 --max-time 7 --connect-timeout 2 "$@"
}
download_retry() {
for delay in {1..3} ""; do
if download --retry-max-time 12 "$@"; then
return 0
fi
if [ -n "$delay" ]; then
sleep "$delay"
fi
done
return 1
}
|