Commit 12f8e6e1 authored by Nicolas Lenz's avatar Nicolas Lenz
Browse files

Recursive pull

parent c3427d34
......@@ -15,6 +15,9 @@ dependencies:
- classy-prelude
- text
- path
- path-io
- process
- async
default-extensions:
- NoImplicitPrelude
......
module Command where
import ClassyPrelude
import Path
import System.Process
import System.Exit
pull :: Path Abs Dir -> IO Bool
pull path = readCreateProcessWithExitCode ((proc "git" ["pull"]) {cwd = Just $ fromAbsDir path}) "" >>= \case
(ExitSuccess, _, _) -> return True
_ -> return False
import ClassyPrelude
import Path.IO
-- import Control.Concurrent.Async
import Command
main :: IO ()
main = putStrLn "Hello World"
main = do
current <- getCurrentDir
(dirs, _) <- listDir current
results <- mapConcurrently Command.pull dirs
putStrLn $ tshow results
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment