From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.groups.io with SMTP id smtpd.web10.5445.1571234997343157140 for ; Wed, 16 Oct 2019 07:09:57 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: philmd@redhat.com) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F346D30089BA; Wed, 16 Oct 2019 14:09:56 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.172]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7941F5D6A9; Wed, 16 Oct 2019 14:09:53 +0000 (UTC) From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= To: Leif Lindholm , devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Laszlo Ersek , Philippe Mathieu-Daude Subject: [PATCH 3/3] BaseTools: Add script to help git-send-email pick addresses to cc Date: Wed, 16 Oct 2019 16:09:40 +0200 Message-Id: <20191016140940.18844-4-philmd@redhat.com> In-Reply-To: <20191016140940.18844-1-philmd@redhat.com> References: <20191016140940.18844-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 16 Oct 2019 14:09:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Add a new script GitCcCmd.sh that git-send-email can use to automatically determine which addresses to cc on patch submission. Signed-off-by: Philippe Mathieu-Daude --- BaseTools/Scripts/GitCcCmd.sh | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 BaseTools/Scripts/GitCcCmd.sh diff --git a/BaseTools/Scripts/GitCcCmd.sh b/BaseTools/Scripts/GitCcCmd.s= h new file mode 100755 index 000000000000..3afdf3f1e40b --- /dev/null +++ b/BaseTools/Scripts/GitCcCmd.sh @@ -0,0 +1,38 @@ +#!/bin/sh +### +# @file +# Shell script to be called by 'git-send-email --cc-cmd' to pick the cor= rect +# maintainer emails for each patch when sending a series. +# +# Copyright (C) 2019, Red Hat, Inc. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# This script expects the following EDK2 environment variables defined: +# - WORKSPACE +# - EDK_TOOLS_PATH +# +### + +set -e + +# +# git-send-email calls this script with a list of patches generated by +# git-format-patch. +# +for arg in $@; do + case ${arg} in + *0000-cover-letter.patch) + break + ;; + *.patch) + test -e ${arg} && ( + cd ${WORKSPACE} && \ + head -1 < ${arg} \ + | cut -d' ' -f2 \ + | xargs python ${EDK_TOOLS_PATH}/Scripts/GetMaintainer.py --= quiet + ) + break + ;; + esac +done --=20 2.21.0