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
|
2010-11-02 23:04:24 +00:00
|
|
|
import CmdLine
|
2010-10-14 20:13:43 +00:00
|
|
|
import qualified GitRepo as Git
|
2010-10-17 15:47:36 +00:00
|
|
|
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
|
2010-10-17 15:47:36 +00:00
|
|
|
state <- Annex.new gitrepo allBackends
|
2010-10-21 20:30:16 +00:00
|
|
|
(configure, actions) <- parseCmd args state
|
2010-12-02 21:51:02 +00:00
|
|
|
tryRun state $ [startup, upgrade] ++ configure ++ actions
|