Skip to content
Snippets Groups Projects
Commit 68fae4f2 authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

contrib: add retry/delay to download commands

This help in some rare DNS resolving or network error events.

Refs #74716

Change-Id: If79a5ba95003c45d87c39c73cf3a4f7b4a26d119
parent 2dc50605
Branches
No related tags found
No related merge requests found
......@@ -214,10 +214,10 @@ endif
SVN ?= $(error subversion client (svn) not found!)
ifeq ($(shell curl --version >/dev/null 2>&1 || echo FAIL),)
download = curl -f -L -- "$(1)" > "$@"
download = curl -f -L --retry-delay 10 --retry 2 -- "$(1)" > "$@"
else ifeq ($(shell wget --version >/dev/null 2>&1 || echo FAIL),)
download = rm -f $@.tmp && \
wget --passive -c -p -O $@.tmp "$(1)" && \
wget --passive -t 2 -w 10 -c -p -O $@.tmp "$(1)" && \
touch $@.tmp && \
mv $@.tmp $@
else ifeq ($(which fetch >/dev/null 2>&1 || echo FAIL),)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment