Files
ack-tegra/scripts/get_emails.sh
T
Saravana Kannan b79cbaaba1 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>
2025-10-31 17:22:53 -07:00

44 lines
838 B
Bash
Executable File

#!/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