From: Tomi Ollila Date: Wed, 26 Mar 2014 15:09:51 +0000 (+0200) Subject: [PATCH 1/1] test-databases: use wget or curl to download test databases X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f522fb952a966127b5b09bfbf49290fd644b76d7;p=notmuch-archives.git [PATCH 1/1] test-databases: use wget or curl to download test databases --- diff --git a/be/2488e8f6883e1b881ba02723e896b7090b822e b/be/2488e8f6883e1b881ba02723e896b7090b822e new file mode 100644 index 000000000..0dae80952 --- /dev/null +++ b/be/2488e8f6883e1b881ba02723e896b7090b822e @@ -0,0 +1,70 @@ +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 +