git-annex/Command/InAnnex.hs

27 lines
506 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
import AnnexCommon
import Command
import 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