2010-12-31 00:08:22 +00:00
|
|
|
{- git-annex command
|
|
|
|
-
|
|
|
|
- Copyright 2010 Joey Hess <joey@kitenet.net>
|
|
|
|
-
|
|
|
|
- Licensed under the GNU GPL version 3 or higher.
|
|
|
|
-}
|
|
|
|
|
|
|
|
module Command.InAnnex where
|
|
|
|
|
2011-10-04 02:24:57 +00:00
|
|
|
import AnnexCommon
|
2010-12-31 00:08:22 +00:00
|
|
|
import Command
|
2011-01-16 20:05:05 +00:00
|
|
|
import Content
|
2010-12-31 00:08:22 +00:00
|
|
|
|
|
|
|
command :: [Command]
|
2011-03-19 22:58:49 +00:00
|
|
|
command = [repoCommand "inannex" (paramRepeating paramKey) seek
|
2010-12-31 00:08:22 +00:00
|
|
|
"checks if keys are present in the annex"]
|
|
|
|
|
|
|
|
seek :: [CommandSeek]
|
|
|
|
seek = [withKeys start]
|
|
|
|
|
2011-09-15 20:50:49 +00:00
|
|
|
start :: Key -> CommandStart
|
2011-03-16 02:42:34 +00:00
|
|
|
start key = do
|
2010-12-31 00:08:22 +00:00
|
|
|
present <- inAnnex key
|
|
|
|
if present
|
2011-05-15 06:02:46 +00:00
|
|
|
then stop
|
2011-07-15 16:47:14 +00:00
|
|
|
else liftIO exitFailure
|