From 6d6bb94c3646cdaa44f807b879fea3058387c5ae Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 4 May 2017 16:44:38 -0400 Subject: --verify mode This commit was sponsored by Thom May on Patreon. --- CmdLine.hs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CmdLine.hs') diff --git a/CmdLine.hs b/CmdLine.hs index 0046b4c..2a64b6c 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -25,6 +25,7 @@ data Mode | WatchMode WatchOpts | GraphvizMode GraphvizOpts | ReplayMode ReplayOpts + | VerifyMode VerifyOpts | ServerMode ServerOpts | ControlMode ControlOpts @@ -54,6 +55,10 @@ data ReplayOpts = ReplayOpts { replayLogFile :: FilePath } +data VerifyOpts = VerifyOpts + { verifyLogFile :: FilePath + } + data ServerOpts = ServerOpts { serverDirectory :: FilePath , serverPort :: Port @@ -72,6 +77,7 @@ parseMode :: Parser Mode parseMode = (UserMode <$> parseuser) <|> (DeveloperMode <$> parsedeveloper) <|> (ReplayMode <$> parsereplay) + <|> (VerifyMode <$> parseverify) <|> (DownloadMode <$> parsedownload) <|> (WatchMode <$> parsewatch) <|> (GraphvizMode <$> parsegraphviz) @@ -112,6 +118,12 @@ parseMode = (UserMode <$> parseuser) <> metavar "logfile" <> help "replay log file" ) + parseverify = VerifyOpts + <$> option str + ( long "verify" + <> metavar "logfile" + <> help "verify log file" + ) parsedownload = DownloadOpts <$> option readurl ( long "download" -- cgit v1.2.3