From: Florian Fainelli Date: Wed, 14 Jun 2017 17:57:29 +0000 (-0700) Subject: README: Provide an example hook script X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ad4042349371c7e6caface81d6579d5d9aa4b11a;p=users%2Fdedekind%2Faiaiai.git README: Provide an example hook script Provide a simple hook script that just looks at the X-Aiaiai-Project header that could be added, with e.g: git format-patch --add-header="X-Aiaiai-Project: foo" while formatting patches. This is enough to avoid per-project email addresses. Signed-off-by: Florian Fainelli Signed-off-by: Jacob Keller --- diff --git a/doc/README b/doc/README index c2ebd1f..ff140cc 100644 --- a/doc/README +++ b/doc/README @@ -138,7 +138,13 @@ aiaiai+foo@domain.tld. In case you would want to use the same aiaiai recipient email address for all projects, you need to create a hook file which will be looking at the X-Aiaiai-Project header in the mbox file, and output it to stdout (see: -email/aiaiai-email-test-patchset) +email/aiaiai-email-test-patchset). An example hook script could look like this: + +#!/bin/sh +CFGFILE="$1" +MBOX="$2" +grep "X-Aiaiai-Project" $MBOX +ret=$? 1.3 Non-e-mail scripts ~~~~~~~~~~~~~~~~~~~~~~