2019-12-18 17:18:55 +03:00
|
|
|
{- SPDX-FileCopyrightText: 2018-2019 Serokell <https://serokell.io>
|
|
|
|
-
|
|
|
|
- SPDX-License-Identifier: MPL-2.0
|
|
|
|
-}
|
|
|
|
|
2018-10-11 00:15:08 +03:00
|
|
|
module Main where
|
|
|
|
|
2021-07-26 11:00:21 +03:00
|
|
|
import Universum
|
|
|
|
|
2021-07-26 11:05:00 +03:00
|
|
|
import Data.ByteString qualified as BS
|
2020-03-25 16:34:32 +03:00
|
|
|
import Main.Utf8 (withUtf8)
|
2018-10-11 00:15:08 +03:00
|
|
|
|
2021-09-22 18:05:29 +03:00
|
|
|
import Xrefcheck.CLI (Command (..), getCommand)
|
|
|
|
import Xrefcheck.Command (defaultAction)
|
|
|
|
import Xrefcheck.Config (defConfigText)
|
2019-12-03 22:51:39 +03:00
|
|
|
|
|
|
|
main :: IO ()
|
2020-03-25 16:34:32 +03:00
|
|
|
main = withUtf8 $ do
|
2021-09-22 18:05:29 +03:00
|
|
|
command <- getCommand
|
|
|
|
case command of
|
|
|
|
DefaultCommand options ->
|
|
|
|
defaultAction options
|
|
|
|
DumpConfig repoType path ->
|
|
|
|
BS.writeFile path (defConfigText repoType)
|