git-annex/git-annex.hs

23 lines
483 B
Haskell
Raw Normal View History

2010-10-27 20:53:54 +00:00
{- git-annex main program
-
- Copyright 2010 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
2010-10-10 04:18:16 +00:00
2010-10-10 22:05:37 +00:00
import System.Environment
2010-10-16 20:20:49 +00:00
2010-10-14 07:18:11 +00:00
import qualified Annex
2010-10-14 07:40:26 +00:00
import Core
2010-10-14 18:38:29 +00:00
import Commands
2010-10-14 20:13:43 +00:00
import qualified GitRepo as Git
import BackendList
2010-10-10 04:18:16 +00:00
2010-10-31 18:32:18 +00:00
main :: IO ()
2010-10-10 04:18:16 +00:00
main = do
2010-10-10 22:05:37 +00:00
args <- getArgs
2010-10-14 20:13:43 +00:00
gitrepo <- Git.repoFromCwd
state <- Annex.new gitrepo allBackends
(configure, actions) <- parseCmd args state
tryRun state $ [startup] ++ configure ++ actions ++ [shutdown]