]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-databases/Makefile.local
Merge branch 'release'
[notmuch] / test / test-databases / Makefile.local
index ff333a1d86f75e62a394e7fb1dac3c6c18b457f1..7aedff70f6e3df4114f62d32f605d37645d851ca 100644 (file)
@@ -1,13 +1,19 @@
 # -*- makefile -*-
 
-TEST_DATABASE_MIRROR=http://notmuchmail.org/releases/test-databases
+TEST_DATABASE_MIRROR=https://notmuchmail.org/releases/test-databases
 
 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}