summaryrefslogtreecommitdiff
path: root/src/Propellor/CmdLine.hs
diff options
context:
space:
mode:
authorJoey Hess2014-11-23 18:48:52 -0400
committerJoey Hess2014-11-23 18:48:52 -0400
commit9d975e9ee4c44782da0815fb161ea8676dbf559c (patch)
treeb74c1037324cdc4308c98e475202649bf91e27df /src/Propellor/CmdLine.hs
parentbaba668033f86b7c91f6b15c58002ea4bdbf3da2 (diff)
add --merge
Diffstat (limited to 'src/Propellor/CmdLine.hs')
-rw-r--r--src/Propellor/CmdLine.hs3
1 files changed, 3 insertions, 0 deletions
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