git-annex/Command/InAnnex.hs

27 lines
500 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 16:02:51 -04:00
import Common.Annex
import Command
2011-10-04 00:40:47 -04:00
import Annex.Content
def :: [Command]
def = [command "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 02:02:46 -04:00
then stop
2011-07-15 12:47:14 -04:00
else liftIO exitFailure