From: Daniel Axtens Date: Fri, 2 Sep 2016 01:40:04 +0000 (+1000) Subject: parsemail-batch.sh: pass command-line options to parsemail X-Git-Tag: v2.0.0-rc1~212 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a6fd59243d9f9d7dd4b4636d311fe2448545b01;p=thirdparty%2Fpatchwork.git parsemail-batch.sh: pass command-line options to parsemail Signed-off-by: Daniel Axtens Reviewed-by: Stephen Finucane --- diff --git a/patchwork/bin/parsemail-batch.sh b/patchwork/bin/parsemail-batch.sh index 31ef4f0a..06de3d77 100755 --- a/patchwork/bin/parsemail-batch.sh +++ b/patchwork/bin/parsemail-batch.sh @@ -21,9 +21,9 @@ PATCHWORK_BINDIR=`dirname $0` -if [ $# -ne 1 ] +if [ $# -lt 1 ] then - echo "usage: $0 " >&2 + echo "usage: $0 [options]" >&2 exit 1 fi @@ -37,9 +37,11 @@ then exit 1 fi +shift + ls -1rt "$mail_dir" | while read line; do echo $line - $PATCHWORK_BINDIR/parsemail.sh < "$mail_dir/$line" + $PATCHWORK_BINDIR/parsemail.sh $@ < "$mail_dir/$line" done