diff options
| author | Eugen Wissner <belka@caraus.de> | 2023-10-20 19:23:21 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2023-10-20 19:23:21 +0200 |
| commit | 8a69240d88470c3f6076c8dd9130144a2e231a46 (patch) | |
| tree | 7cdca1375affa47b2c36c3d19ce24c013ea38cb7 /app/SlackBuilder | |
| parent | 3a6d17952b247682f1cb794ef27b26c9b007f00d (diff) | |
| download | slackbuilder-8a69240d88470c3f6076c8dd9130144a2e231a46.tar.gz | |
Add librsync and dmd
Diffstat (limited to 'app/SlackBuilder')
| -rw-r--r-- | app/SlackBuilder/CommandLine.hs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/app/SlackBuilder/CommandLine.hs b/app/SlackBuilder/CommandLine.hs index 53a6bfb..4890567 100644 --- a/app/SlackBuilder/CommandLine.hs +++ b/app/SlackBuilder/CommandLine.hs @@ -7,7 +7,6 @@ module SlackBuilder.CommandLine ) where import Data.Text (Text) -import qualified Data.Text as Text import Options.Applicative ( Parser , ParserInfo(..) @@ -21,7 +20,7 @@ import Options.Applicative ) data SlackBuilderCommand - = TextCommand TextArguments + = CategoryCommand Text | SlackBuildCommand Text Text | CommitCommand Text Text | ExistsCommand Text @@ -47,16 +46,12 @@ data TextArguments = TextArguments , textURL :: Text } -textArguments :: Parser TextArguments -textArguments = TextArguments Text.strip - <$> argument str (metavar "URL") - slackBuilderParser :: ParserInfo SlackBuilderCommand slackBuilderParser = info slackBuilderCommand fullDesc slackBuilderCommand :: Parser SlackBuilderCommand slackBuilderCommand = subparser - $ command "text" (info (TextCommand <$> textArguments) mempty) + $ command "category" (info categoryCommand mempty) <> command "slackbuild" (info slackBuildCommand mempty) <> command "commit" (info commitCommand mempty) <> command "exists" (info existsCommand mempty) @@ -66,6 +61,8 @@ slackBuilderCommand = subparser <> command "deploy" (info deployCommand mempty) <> command "up2date" (info up2DateCommand mempty) where + categoryCommand = CategoryCommand + <$> argument str (metavar "PKGNAM") slackBuildCommand = SlackBuildCommand <$> argument str (metavar "PATH") <*> argument str (metavar "VERSION") |
