1 Return-Path: <too@guru-group.fi>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id C829D431FBD
\r
6 for <notmuch@notmuchmail.org>; Wed, 26 Mar 2014 08:10:03 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id OoEeikqoA0Vu for <notmuch@notmuchmail.org>;
\r
16 Wed, 26 Mar 2014 08:09:59 -0700 (PDT)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id B1025431FAF
\r
19 for <notmuch@notmuchmail.org>; Wed, 26 Mar 2014 08:09:58 -0700 (PDT)
\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)
\r
21 id D082E1000F2; Wed, 26 Mar 2014 17:09:52 +0200 (EET)
\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
23 To: notmuch@notmuchmail.org
\r
24 Subject: [PATCH 1/1] test-databases: use wget or curl to download test
\r
26 Date: Wed, 26 Mar 2014 17:09:51 +0200
\r
27 Message-Id: <1395846591-3490-1-git-send-email-tomi.ollila@iki.fi>
\r
28 X-Mailer: git-send-email 1.8.0
\r
29 Cc: tomi.ollila@iki.fi
\r
30 X-BeenThere: notmuch@notmuchmail.org
\r
31 X-Mailman-Version: 2.1.13
\r
33 List-Id: "Use and development of the notmuch mail system."
\r
34 <notmuch.notmuchmail.org>
\r
35 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
36 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
37 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
38 List-Post: <mailto:notmuch@notmuchmail.org>
\r
39 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
40 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
41 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
42 X-List-Received-Date: Wed, 26 Mar 2014 15:10:03 -0000
\r
44 On non-Linux systems curl(1) is often the tool of choice.
\r
46 test/test-databases/Makefile.local | 8 +++++++-
\r
47 1 file changed, 7 insertions(+), 1 deletion(-)
\r
49 diff --git a/test/test-databases/Makefile.local b/test/test-databases/Makefile.local
\r
50 index 0572e78..49db87b 100644
\r
51 --- a/test/test-databases/Makefile.local
\r
52 +++ b/test/test-databases/Makefile.local
\r
53 @@ -7,7 +7,13 @@ dir := test/test-databases
\r
54 test_databases := $(dir)/database-v1.tar.xz
\r
57 - wget -nv -O $@ ${TEST_DATABASE_MIRROR}/$(notdir $@);
\r
58 + @exec 1>&2 ;: consistently write everything to stderr... ;\
\r
59 + if hash wget 2>/dev/null ;\
\r
60 + then set -x; wget -nv -O $@ ${TEST_DATABASE_MIRROR}/$(notdir $@) ;\
\r
61 + elif hash curl 2>/dev/null ;\
\r
62 + then set -x; curl -s -o $@ ${TEST_DATABASE_MIRROR}/$(notdir $@) ;\
\r
63 + else echo Cannot fetch databases, no wget nor curl available; exit 1 ;\
\r
66 download-test-databases: ${test_databases}
\r