summaryrefslogtreecommitdiff
path: root/Utility/Url.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Utility/Url.hs')
-rw-r--r--Utility/Url.hs12
1 files changed, 4 insertions, 8 deletions
diff --git a/Utility/Url.hs b/Utility/Url.hs
index 6ddeecc14..b5f5b78c0 100644
--- a/Utility/Url.hs
+++ b/Utility/Url.hs
@@ -12,13 +12,10 @@ module Utility.Url (
) where
import Control.Applicative
-import Control.Monad.State (liftIO)
import qualified Network.Browser as Browser
import Network.HTTP
import Network.URI
-import Types
-import Messages
import Utility.SafeCommand
import Utility
@@ -38,13 +35,12 @@ exists url =
{- 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,
- so is preferred.) -}
-download :: URLString -> FilePath -> Annex Bool
+download :: URLString -> FilePath -> IO Bool
download url file = do
- showOutput -- make way for program's progress bar
- e <- liftIO $ inPath "wget"
+ e <- inPath "wget"
if e
then
- liftIO $ boolSystem "wget"
+ boolSystem "wget"
[Params "-c -O", File file, File url]
else
-- Uses the -# progress display, because the normal
@@ -52,7 +48,7 @@ download url file = do
-- the remainder to download as the whole file,
-- and not indicating how much percent was
-- downloaded before the resume.
- liftIO $ boolSystem "curl"
+ boolSystem "curl"
[Params "-L -C - -# -o", File file, File url]
{- Downloads a small file. -}