From 88ff9e82fc3dcb653b2a116f1c162d98a1f6bdcf Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 30 Dec 2010 15:44:15 -0400 Subject: factor out a little more --- git-annex.hs | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'git-annex.hs') diff --git a/git-annex.hs b/git-annex.hs index 31d90e4fc..b8176befa 100644 --- a/git-annex.hs +++ b/git-annex.hs @@ -5,17 +5,11 @@ - Licensed under the GNU GPL version 3 or higher. -} -import System.Environment import System.Console.GetOpt -import qualified Annex -import Core -import Upgrade import CmdLine -import qualified GitRepo as Git -import BackendList - import Command + import qualified Command.Add import qualified Command.Unannex import qualified Command.Drop @@ -83,13 +77,5 @@ options = [ "skip files matching the glob pattern" ] -header :: String -header = "Usage: git-annex subcommand [option ..]" - main :: IO () -main = do - args <- getArgs - gitrepo <- Git.repoFromCwd - state <- Annex.new gitrepo allBackends - (actions, state') <- Annex.run state $ parseCmd args header cmds options - tryRun state' $ [startup, upgrade] ++ actions +main = cmdLine cmds options "Usage: git-annex subcommand [option ..]" -- cgit v1.2.3