2010-11-02 23:04:24 +00:00
|
|
|
{- git-annex command
|
|
|
|
-
|
|
|
|
- Copyright 2010 Joey Hess <joey@kitenet.net>
|
|
|
|
-
|
|
|
|
- Licensed under the GNU GPL version 3 or higher.
|
|
|
|
-}
|
|
|
|
|
|
|
|
module Command.Init where
|
|
|
|
|
|
|
|
import Command
|
|
|
|
import qualified Annex
|
|
|
|
import UUID
|
2010-11-08 19:15:21 +00:00
|
|
|
import Messages
|
2011-08-17 18:14:43 +00:00
|
|
|
import Init
|
2010-12-30 19:06:26 +00:00
|
|
|
|
|
|
|
command :: [Command]
|
2011-06-22 22:07:45 +00:00
|
|
|
command = [standaloneCommand "init" paramDesc seek
|
2011-08-29 18:13:38 +00:00
|
|
|
"initialize git-annex"]
|
2010-11-02 23:04:24 +00:00
|
|
|
|
2010-12-30 18:19:16 +00:00
|
|
|
seek :: [CommandSeek]
|
2011-05-16 16:25:54 +00:00
|
|
|
seek = [withWords start]
|
2010-11-11 22:54:52 +00:00
|
|
|
|
2011-09-15 20:50:49 +00:00
|
|
|
start :: [String] -> CommandStart
|
2011-05-16 16:25:54 +00:00
|
|
|
start ws = do
|
2010-11-02 23:04:24 +00:00
|
|
|
showStart "init" description
|
2011-05-15 06:02:46 +00:00
|
|
|
next $ perform description
|
2011-05-16 16:25:54 +00:00
|
|
|
where
|
|
|
|
description = unwords ws
|
2010-11-02 23:04:24 +00:00
|
|
|
|
2010-12-30 18:19:16 +00:00
|
|
|
perform :: String -> CommandPerform
|
2010-11-02 23:04:24 +00:00
|
|
|
perform description = do
|
2011-08-17 18:14:43 +00:00
|
|
|
initialize
|
2010-11-02 23:04:24 +00:00
|
|
|
g <- Annex.gitRepo
|
|
|
|
u <- getUUID g
|
2011-06-22 20:03:26 +00:00
|
|
|
describeUUID u description
|
|
|
|
next $ return True
|