diff options
-rw-r--r-- | modules/download.inc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/download.inc b/modules/download.inc index 5191922..1b5d67c 100644 --- a/modules/download.inc +++ b/modules/download.inc @@ -5,6 +5,14 @@ download() { } download_retry() { - download --retry 3 --retry-max-time 12 "$@" + 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 } |