contentlocation, examinekey, lookupkey: Added --batch mode option.
This commit is contained in:
parent
16fd222113
commit
eeb0359a2e
8 changed files with 86 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue