summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2014-10-31 11:17:48 -0400
committerJoey Hess <joey@kitenet.net>2014-10-31 11:17:48 -0400
commit7d7b6b3693440e6a38ce14f006e342cd7045cfba (patch)
treeda77017fb45b1cfb4f330c20936e2173701ba20f
parentf517a692623245e9e196c25012eb817176df42aa (diff)
Avoid using optparse-applicate's argument combinator, so it will build with 0.11 and older too.
-rw-r--r--debian/changelog2
-rw-r--r--github-backup.hs8
2 files changed, 7 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 6de490c..e488576 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
github-backup (1.20140832) UNRELEASED; urgency=medium
* Adjust cabal file for network-uri split.
+ * Avoid using optparse-applicate's argument combinator, so it will build
+ with 0.11 and older too.
-- Joey Hess <joeyh@debian.org> Fri, 31 Oct 2014 10:43:31 -0400
diff --git a/github-backup.hs b/github-backup.hs
index 48d4e0a..5d68ef4 100644
--- a/github-backup.hs
+++ b/github-backup.hs
@@ -642,12 +642,14 @@ data Owner = Owner String
deriving (Show)
options :: Parser Options
-options = Options <$> many owneropt <*> many excludeopt
+options = Options
+ <$> many owneropt
+ <*> many excludeopt
where
- owneropt = (argument (Just . Owner))
+ owneropt = Owner <$> (strOption
( metavar "USERNAME|ORGANIZATION"
<> help "Back up repositories owned by this entity."
- )
+ ))
excludeopt = parseUserRepo <$> (strOption
( long "exclude"
<> metavar "USERNAME/REPOSITORY"