summaryrefslogtreecommitdiff
path: root/git-annex.hs
diff options
context:
space:
mode:
Diffstat (limited to 'git-annex.hs')
-rw-r--r--git-annex.hs27
1 files changed, 5 insertions, 22 deletions
diff --git a/git-annex.hs b/git-annex.hs
index b8176befa..6c143972a 100644
--- a/git-annex.hs
+++ b/git-annex.hs
@@ -5,10 +5,11 @@
- Licensed under the GNU GPL version 3 or higher.
-}
-import System.Console.GetOpt
+import System.Environment
import CmdLine
import Command
+import Options
import qualified Command.Add
import qualified Command.Unannex
@@ -57,25 +58,7 @@ cmds = concat
, Command.Find.command
]
-options :: [Option]
-options = [
- Option ['f'] ["force"] (NoArg (storeOptBool "force" True))
- "allow actions that may lose annexed data"
- , Option ['q'] ["quiet"] (NoArg (storeOptBool "quiet" True))
- "avoid verbose output"
- , Option ['v'] ["verbose"] (NoArg (storeOptBool "quiet" False))
- "allow verbose output"
- , Option ['b'] ["backend"] (ReqArg (storeOptString "backend") paramName)
- "specify default key-value backend to use"
- , Option ['k'] ["key"] (ReqArg (storeOptString "key") paramKey)
- "specify a key to use"
- , Option ['t'] ["to"] (ReqArg (storeOptString "torepository") paramRemote)
- "specify to where to transfer content"
- , Option ['f'] ["from"] (ReqArg (storeOptString "fromrepository") paramRemote)
- "specify from where to transfer content"
- , Option ['x'] ["exclude"] (ReqArg (storeOptString "exclude") paramGlob)
- "skip files matching the glob pattern"
- ]
-
main :: IO ()
-main = cmdLine cmds options "Usage: git-annex subcommand [option ..]"
+main = do
+ args <- getArgs
+ dispatch args cmds commonOptions "Usage: git-annex command [option ..]"