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
|
2010-11-02 19:04:24 -04:00
|
|
|
import CmdLine
|
2010-10-14 16:13:43 -04:00
|
|
|
import qualified GitRepo as Git
|
2010-10-17 11:47:36 -04:00
|
|
|
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
|
2010-10-17 11:47:36 -04:00
|
|
|
state <- Annex.new gitrepo allBackends
|
2010-12-08 14:07:49 -04:00
|
|
|
(actions, state') <- Annex.run state $ parseCmd args
|
|
|
|
tryRun state' $ [startup, upgrade] ++ actions
|