From 8e2f74f7ab188b72b1053140f28f1f4a6a792675 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 20 Dec 2011 18:14:20 -0400 Subject: [PATCH] update --- Utility/Url.hs | 4 ++++ configure.hs | 1 + 2 files changed, 5 insertions(+) diff --git a/Utility/Url.hs b/Utility/Url.hs index 7ce43d9bd1..f215a1ebdb 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -7,6 +7,7 @@ module Utility.Url ( exists, + canDownload, download, get ) where @@ -32,6 +33,9 @@ exists url = (2,_,_) -> return True _ -> return False +canDownload :: IO Bool +canDownload = (||) <$> inPath "wget" <*> inPath "curl" + {- Used to download large files, such as the contents of keys. - - Uses wget or curl program for its progress bar. (Wget has a better one, diff --git a/configure.hs b/configure.hs index 0d96b39554..bf25de5079 100644 --- a/configure.hs +++ b/configure.hs @@ -19,6 +19,7 @@ tests = , TestCase "xargs -0" $ requireCmd "xargs_0" "xargs -0 /dev/null" , TestCase "curl" $ testCmd "curl" "curl --version >/dev/null" + , TestCase "wget" $ testCmd "wget" "wget --version >/dev/null" , TestCase "bup" $ testCmd "bup" "bup --version >/dev/null" , TestCase "gpg" $ testCmd "gpg" "gpg --version >/dev/null" ] ++ shaTestCases [1, 256, 512, 224, 384]