diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-05-06 13:44:53 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-05-06 13:44:53 -0400 |
commit | 2bbb276e38fb8503daccf7a419336d67c0a23c9c (patch) | |
tree | d796474a8b82bc5e79ae99a40ee93fd81cdf83a7 /Command/ContentLocation.hs | |
parent | 582fa3e2f10f1e1064314a8a1d9bb5aa5cf84f92 (diff) |
contentlocation, examinekey, lookupkey: Added --batch mode option.
Diffstat (limited to 'Command/ContentLocation.hs')
-rw-r--r-- | Command/ContentLocation.hs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Command/ContentLocation.hs b/Command/ContentLocation.hs index 3f4775f57..10879f5b1 100644 --- a/Command/ContentLocation.hs +++ b/Command/ContentLocation.hs @@ -9,19 +9,20 @@ module Command.ContentLocation where import Common.Annex import Command +import CmdLine.Batch import Annex.Content cmd :: [Command] -cmd = [noCommit $ noMessages $ +cmd = [withOptions [batchOption] $ noCommit $ noMessages $ command "contentlocation" (paramRepeating paramKey) seek SectionPlumbing "looks up content for a key"] seek :: CommandSeek -seek = withKeys start +seek = batchable withKeys start -start :: Key -> CommandStart -start k = do - liftIO . maybe exitFailure putStrLn +start :: Batchable Key +start batchmode k = do + maybe (batchBadInput batchmode) (liftIO . putStrLn) =<< inAnnex' (pure True) Nothing check k stop where |