git-annex/git-annex.hs

24 lines
506 B
Haskell
Raw Normal View History

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