mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
test-databases: use wget or curl to download test databases
Often Linux systems are shipped with wget(1) by default (and no curl). Many BSDs, macOS, and e.g. some Linux minimal/container images comes with curl(1) (and no wget). Attempting to download with curl if wget is not available increases the likelihood for this to succeed.
This commit is contained in:
parent
62822a4e2d
commit
9c3a27dee9
1 changed files with 7 additions and 1 deletions
|
@ -7,7 +7,13 @@ dir := test/test-databases
|
|||
test_databases := $(dir)/database-v1.tar.xz
|
||||
|
||||
%.tar.xz:
|
||||
wget -nv -O $@ ${TEST_DATABASE_MIRROR}/$(notdir $@);
|
||||
@exec 1>&2 ;\
|
||||
if command -v wget >/dev/null ;\
|
||||
then set -x; wget -nv -O $@ ${TEST_DATABASE_MIRROR}/$(notdir $@) ;\
|
||||
elif command -v curl >/dev/null ;\
|
||||
then set -x; curl -L -s -o $@ ${TEST_DATABASE_MIRROR}/$(notdir $@) ;\
|
||||
else echo Cannot fetch databases, no wget nor curl available; exit 1 ;\
|
||||
fi
|
||||
|
||||
download-test-databases: ${test_databases}
|
||||
|
||||
|
|
Loading…
Reference in a new issue