]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
parsemail-batch.sh: pass command-line options to parsemail
authorDaniel Axtens <dja@axtens.net>
Fri, 2 Sep 2016 01:40:04 +0000 (11:40 +1000)
committerStephen Finucane <stephen@that.guru>
Fri, 7 Oct 2016 17:57:48 +0000 (18:57 +0100)
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Stephen Finucane <stephen@that.guru>
patchwork/bin/parsemail-batch.sh

index 31ef4f0a7e4f0ef83b7b1cdb8d7fca8383e53b2e..06de3d77ac95984ea5ee45b7d1da892a46d2d01a 100755 (executable)
@@ -21,9 +21,9 @@
 
 PATCHWORK_BINDIR=`dirname $0`
 
-if [ $# -ne 1 ]
+if [ $# -lt 1 ]
 then
-       echo "usage: $0 <dir>" >&2
+       echo "usage: $0 <dir> [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