Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C829D431FBD for ; Wed, 26 Mar 2014 08:10:03 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OoEeikqoA0Vu for ; Wed, 26 Mar 2014 08:09:59 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id B1025431FAF for ; Wed, 26 Mar 2014 08:09:58 -0700 (PDT) Received: by guru.guru-group.fi (Postfix, from userid 501) id D082E1000F2; Wed, 26 Mar 2014 17:09:52 +0200 (EET) From: Tomi Ollila To: notmuch@notmuchmail.org Subject: [PATCH 1/1] test-databases: use wget or curl to download test databases Date: Wed, 26 Mar 2014 17:09:51 +0200 Message-Id: <1395846591-3490-1-git-send-email-tomi.ollila@iki.fi> X-Mailer: git-send-email 1.8.0 Cc: tomi.ollila@iki.fi X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2014 15:10:03 -0000 On non-Linux systems curl(1) is often the tool of choice. --- test/test-databases/Makefile.local | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/test-databases/Makefile.local b/test/test-databases/Makefile.local index 0572e78..49db87b 100644 --- a/test/test-databases/Makefile.local +++ b/test/test-databases/Makefile.local @@ -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 ;: consistently write everything to stderr... ;\ + if hash wget 2>/dev/null ;\ + then set -x; wget -nv -O $@ ${TEST_DATABASE_MIRROR}/$(notdir $@) ;\ + elif hash curl 2>/dev/null ;\ + then set -x; curl -s -o $@ ${TEST_DATABASE_MIRROR}/$(notdir $@) ;\ + else echo Cannot fetch databases, no wget nor curl available; exit 1 ;\ + fi download-test-databases: ${test_databases} -- 1.8.0