summaryrefslogtreecommitdiff
path: root/src/Propellor/Protocol.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/Protocol.hs')
-rw-r--r--src/Propellor/Protocol.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Propellor/Protocol.hs b/src/Propellor/Protocol.hs
index 4dc7e6bb..164f6db6 100644
--- a/src/Propellor/Protocol.hs
+++ b/src/Propellor/Protocol.hs
@@ -9,7 +9,7 @@ import Data.List
import Propellor
-data BootStrapStatus = Ready | NeedGitClone | RepoUrl
+data Stage = Ready | NeedGitClone | NeedRepoUrl | NeedPrivData
deriving (Read, Show, Eq)
type Marker = String
@@ -49,3 +49,8 @@ getMarked h marker = go =<< catchMaybeIO (hGetLine h)
putStrLn l
getMarked h marker
Just v -> return (Just v)
+
+req :: Stage -> Marker -> (String -> IO ()) -> IO ()
+req stage marker a = do
+ sendMarked stdout statusMarker (show stage)
+ maybe noop a =<< getMarked stdin marker