git-annex/Command/InAnnex.hs

27 lines
513 B
Haskell
Raw Normal View History

{- 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-05 20:02:51 +00:00
import Common.Annex
import Command
2011-10-04 04:40:47 +00:00
import Annex.Content
command :: [Command]
command = [repoCommand "inannex" (paramRepeating paramKey) seek
"checks if keys are present in the annex"]
seek :: [CommandSeek]
seek = [withKeys start]
start :: Key -> CommandStart
start key = do
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