ANDROID: scripts: get_emails.sh wrapper around get_maintainers
For a given patch file, this wrapper gives the list of maintainer/list names and emails/list emails in a format that git send-email can understand. Bug: 452558671 Bug: 452304382 Change-Id: Ic3f07da403202e4c7f4770eb8c3c4fb9bc2de033 Signed-off-by: Saravana Kannan <saravanak@google.com>
This commit is contained in:
1 parent
9210d0290e
commit
b79cbaaba1
1 file changed
+43
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (c) 2020, Google LLC. All rights reserved.
|
||||
# Author: Saravana Kannan <saravanak@google.com>
|
||||
|
||||
# Find top of git repo
|
||||
while [ `pwd` != '/' -a ! -d .git ]
|
||||
do
|
||||
cd ..
|
||||
done
|
||||
|
||||
# Exit if you can't find it
|
||||
if [ ! -d .git ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f ./scripts/get_maintainer.pl ]
|
||||
then
|
||||
exit 2
|
||||
fi
|
||||
|
||||
opt='--no-rolestats --no-git-fallback --multiline --n'
|
||||
if [ "$1" = '-cc' ]
|
||||
then
|
||||
shift
|
||||
opt="$opt --no-m --no-r --l"
|
||||
echo kernel-team@android.com
|
||||
else
|
||||
opt="$opt --m --r --no-l"
|
||||
fi
|
||||
|
||||
# Special case for git send-email that only passes one patch at a time
|
||||
if [ $# -eq 1 ]
|
||||
then
|
||||
prefix="$1"
|
||||
# Intentionally stripping out only the last 2 digits in the patch
|
||||
# number
|
||||
prefix=$(echo $1 | sed -e "s/[0-9][0-9]-.*\.patch/*.patch/")
|
||||
set "$prefix"
|
||||
fi
|
||||
|
||||
./scripts/get_maintainer.pl $opt $* 2>/dev/null
|
||||
Reference in new issue
Block a user