update
This commit is contained in:
parent
815d1318d7
commit
8e2f74f7ab
2 changed files with 5 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
module Utility.Url (
|
module Utility.Url (
|
||||||
exists,
|
exists,
|
||||||
|
canDownload,
|
||||||
download,
|
download,
|
||||||
get
|
get
|
||||||
) where
|
) where
|
||||||
|
@ -32,6 +33,9 @@ exists url =
|
||||||
(2,_,_) -> return True
|
(2,_,_) -> return True
|
||||||
_ -> return False
|
_ -> return False
|
||||||
|
|
||||||
|
canDownload :: IO Bool
|
||||||
|
canDownload = (||) <$> inPath "wget" <*> inPath "curl"
|
||||||
|
|
||||||
{- Used to download large files, such as the contents of keys.
|
{- 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,
|
- Uses wget or curl program for its progress bar. (Wget has a better one,
|
||||||
|
|
|
@ -19,6 +19,7 @@ tests =
|
||||||
, TestCase "xargs -0" $ requireCmd "xargs_0" "xargs -0 </dev/null"
|
, TestCase "xargs -0" $ requireCmd "xargs_0" "xargs -0 </dev/null"
|
||||||
, TestCase "rsync" $ requireCmd "rsync" "rsync --version >/dev/null"
|
, TestCase "rsync" $ requireCmd "rsync" "rsync --version >/dev/null"
|
||||||
, TestCase "curl" $ testCmd "curl" "curl --version >/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 "bup" $ testCmd "bup" "bup --version >/dev/null"
|
||||||
, TestCase "gpg" $ testCmd "gpg" "gpg --version >/dev/null"
|
, TestCase "gpg" $ testCmd "gpg" "gpg --version >/dev/null"
|
||||||
] ++ shaTestCases [1, 256, 512, 224, 384]
|
] ++ shaTestCases [1, 256, 512, 224, 384]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue