add flags, and change to subcommand style

This commit is contained in:
Joey Hess 2010-10-14 21:10:59 -04:00
parent 4c3ad80f32
commit 29039fdf97
7 changed files with 59 additions and 30 deletions

View file

@ -12,10 +12,10 @@ import qualified GitRepo as Git
main = do
args <- getArgs
actions <- argvToActions args
(flags, actions) <- parseCmd args
gitrepo <- Git.repoFromCwd
state <- new gitrepo
tryRun state $ [setup] ++ actions ++ [shutdown]
tryRun state $ [startup flags] ++ actions ++ [shutdown]
{- Runs a list of Annex actions. Catches exceptions, not stopping
- if some error out, and propigates an overall error status at the end.