propellor spin
This commit is contained in:
parent
083b82d810
commit
0d65fdeb1d
|
@ -27,17 +27,19 @@ import Utility.SafeCommand
|
||||||
-- running the updateServer
|
-- running the updateServer
|
||||||
update :: IO ()
|
update :: IO ()
|
||||||
update = do
|
update = do
|
||||||
req NeedRepoUrl repoUrlMarker setRepoUrl
|
whenM hasOrigin $
|
||||||
|
req NeedRepoUrl repoUrlMarker setRepoUrl
|
||||||
makePrivDataDir
|
makePrivDataDir
|
||||||
req NeedPrivData privDataMarker $
|
req NeedPrivData privDataMarker $
|
||||||
writeFileProtected privDataLocal
|
writeFileProtected privDataLocal
|
||||||
req NeedGitPush gitPushMarker $ \_ -> do
|
whenM hasOrigin $
|
||||||
hin <- dup stdInput
|
req NeedGitPush gitPushMarker $ \_ -> do
|
||||||
hout <- dup stdOutput
|
hin <- dup stdInput
|
||||||
hClose stdin
|
hout <- dup stdOutput
|
||||||
hClose stdout
|
hClose stdin
|
||||||
unlessM (boolSystem "git" (pullparams hin hout)) $
|
hClose stdout
|
||||||
errorMessage "git pull from client failed"
|
unlessM (boolSystem "git" (pullparams hin hout)) $
|
||||||
|
errorMessage "git pull from client failed"
|
||||||
where
|
where
|
||||||
pullparams hin hout =
|
pullparams hin hout =
|
||||||
[ Param "pull"
|
[ Param "pull"
|
||||||
|
@ -76,6 +78,7 @@ updateServer hn hst connect = connect go
|
||||||
hClose toh
|
hClose toh
|
||||||
hClose fromh
|
hClose fromh
|
||||||
sendPrecompiled hn
|
sendPrecompiled hn
|
||||||
|
loop
|
||||||
Nothing -> return ()
|
Nothing -> return ()
|
||||||
|
|
||||||
sendRepoUrl :: Handle -> IO ()
|
sendRepoUrl :: Handle -> IO ()
|
||||||
|
|
Loading…
Reference in New Issue