From 9d975e9ee4c44782da0815fb161ea8676dbf559c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 23 Nov 2014 18:48:52 -0400 Subject: add --merge --- src/Propellor/CmdLine.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Propellor/CmdLine.hs') diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs index 4a0ac613..3e375c7e 100644 --- a/src/Propellor/CmdLine.hs +++ b/src/Propellor/CmdLine.hs @@ -29,6 +29,7 @@ usage h = hPutStrLn h $ unlines , " propellor --dump field context" , " propellor --edit field context" , " propellor --list-fields" + , " propellor --merge" ] usageError :: [String] -> IO a @@ -49,6 +50,7 @@ processCmdLine = go =<< getArgs go ("--dump":f:c:[]) = withprivfield f c Dump go ("--edit":f:c:[]) = withprivfield f c Edit go ("--list-fields":[]) = return ListFields + go ("--merge":[]) = return Merge go ("--help":_) = do usage stdout exitFailure @@ -98,6 +100,7 @@ defaultMain hostlist = do go _ (GitPush fin fout) = gitPushHelper fin fout go _ (Update Nothing) = forceConsole >> fetchFirst (onlyprocess (update Nothing)) go _ (Update (Just h)) = forceConsole >> fetchFirst (update (Just h)) + go _ Merge = mergeSpin go True cmdline@(Spin _ _) = buildFirst cmdline $ go False cmdline go True cmdline = updateFirst cmdline $ go False cmdline go False (Spin hs r) = do -- cgit v1.2.3