summaryrefslogtreecommitdiff
path: root/CmdLine
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-01-20 12:46:00 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-01-20 12:46:00 -0400
commit7b5ddc7a4e972cfa3d14fbefc6610fddbfcff4b7 (patch)
treed5eb70b0659e897349b79e6674d5c201d192faa0 /CmdLine
parentc5f532e7d7a13ed9f43fe9d50a1dc6521afce4f2 (diff)
whereis --batch
Diffstat (limited to 'CmdLine')
-rw-r--r--CmdLine/Batch.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/CmdLine/Batch.hs b/CmdLine/Batch.hs
index e7706881a..0cbd3781d 100644
--- a/CmdLine/Batch.hs
+++ b/CmdLine/Batch.hs
@@ -65,3 +65,8 @@ batchInput parser a = do
batchCommandAction :: CommandStart -> Annex ()
batchCommandAction a = maybe (batchBadInput Batch) (const noop)
=<< callCommandAction' a
+
+-- Reads lines of batch input and passes the filepaths to a CommandStart
+-- to handle them.
+batchFiles :: (FilePath -> CommandStart) -> Annex ()
+batchFiles a = batchInput Right $ batchCommandAction . a