WIP on making --quiet silence progress, and infra for concurrent progress bars
This commit is contained in:
parent
c2c901a6e4
commit
20fb91a7ad
14 changed files with 194 additions and 93 deletions
|
@ -19,6 +19,7 @@ import Logs.Web
|
|||
import Types.UrlContents
|
||||
import Types.CleanupActions
|
||||
import Types.Key
|
||||
import Messages.Progress
|
||||
import Utility.Metered
|
||||
import Utility.Tmp
|
||||
import Backend.URL
|
||||
|
@ -291,11 +292,12 @@ runAria :: [CommandParam] -> Annex Bool
|
|||
runAria ps = liftIO . boolSystem "aria2c" =<< ariaParams ps
|
||||
|
||||
-- Parse aria output to find "(n%)" and update the progress meter
|
||||
-- with it. The output is also output to stdout.
|
||||
-- with it.
|
||||
ariaProgress :: Maybe Integer -> MeterUpdate -> [CommandParam] -> Annex Bool
|
||||
ariaProgress Nothing _ ps = runAria ps
|
||||
ariaProgress (Just sz) meter ps =
|
||||
liftIO . commandMeter (parseAriaProgress sz) meter "aria2c"
|
||||
ariaProgress (Just sz) meter ps = do
|
||||
h <- mkProgressHandler meter
|
||||
liftIO . commandMeter (parseAriaProgress sz) h "aria2c"
|
||||
=<< ariaParams ps
|
||||
|
||||
parseAriaProgress :: Integer -> ProgressParser
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue