tool: second try on failing check of file-based port

We call curl a second time if the first check fails. This gives download
sites time to reconsider their response and helps, for example, to check
the qemu-usb port.
This commit is contained in:
Christian Helmuth 2017-03-03 08:53:02 +01:00
parent 6bc3bc5881
commit cc78f0b20c
1 changed files with 6 additions and 1 deletions

View File

@ -54,8 +54,13 @@ check: $(DOWNLOADS)
#
# Check plain remote file
#
# We call curl a second time if the first check fails. This gives download
# sites time to reconsider their response and helps, for example, to check the
# qemu-usb port.
#
CURL_CMD = curl -f -L -k -r -2 --max-time 15 --retry 2 $(URL($*)) > /dev/null 2>&1
%.file:
$(VERBOSE)curl -f -L -k -r -2 --max-time 15 --retry 2 $(URL($*)) > /dev/null 2>&1
$(VERBOSE)$(CURL_CMD) || (sleep 1; $(CURL_CMD))
%.archive: %.file
$(VERBOSE)true