git-annex/git-annex.hs

24 lines
492 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-11-14 18:44:24 +00:00
import Upgrade
import CmdLine
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, upgrade] ++ configure ++ actions