diff --git a/Propellor/CmdLine.hs b/Propellor/CmdLine.hs index fd5daed..8968d27 100644 --- a/Propellor/CmdLine.hs +++ b/Propellor/CmdLine.hs @@ -142,17 +142,16 @@ spin host = do user = "root@"++host bootstrapcmd = shellWrap $ intercalate " && " - [ intercalate " ; " - [ "if [ ! -d " ++ localdir ++ " ]" - , "then " ++ intercalate " && " - [ "apt-get -y install git" - , "echo " ++ toMarked statusMarker (show NeedGitClone) - ] - , "fi" + [ "if [ ! -d " ++ localdir ++ " ]" + , "then " ++ intercalate " && " + [ "apt-get -y install git" + , "echo " ++ toMarked statusMarker (show NeedGitClone) + ] + , "else " ++ intercalate " && " + [ "cd " ++ localdir + , "if [ ! -x ./propellor ]; then make build; fi" + , "./propellor --boot " ++ host ] - , "cd " ++ localdir - , "make build" - , "./propellor --boot " ++ host ] getstatus :: Handle -> IO BootStrapStatus