Browse Source

tools: use curl --retry to download tarballs

If some URLs are flaky we have a better chance of not failing a build.
(like GNU mirrors and git)

We don't need a temporary file, we let curl manage the output file and
overwrite it when necessary. If anything the hash will not match.

(cherry picked from commit ded9e6c5d9)
cherry-pick-c5513cf9
Steve Lhomme 11 months ago
parent
commit
8c7274c258
  1. 2
      extras/tools/tools.mak

2
extras/tools/tools.mak

@ -10,7 +10,7 @@ TARBALLS := $(TOOLS)
#
ifeq ($(shell command -v curl >/dev/null 2>&1 || echo FAIL),)
download = curl -f -L -- "$(1)" > "$@.tmp" && touch $@.tmp && mv $@.tmp $@
download = curl -f -L --retry 3 --output "$@" -- "$(1)"
else ifeq ($(shell command -v wget >/dev/null 2>&1 || echo FAIL),)
download = rm -f $@.tmp && \
wget --passive -c -p -O $@.tmp "$(1)" && \

Loading…
Cancel
Save