Skip to content
Snippets Groups Projects
Commit 369a11f9 authored by Jani Nikula's avatar Jani Nikula
Browse files

dim: Fix shellcheck SC2162 and SC2166


Fixes: 809748225c4e ("dim: Add add-missing-cc command")
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 89689e2e
No related branches found
No related tags found
No related merge requests found
......@@ -1959,7 +1959,9 @@ function dim_fixes
function dim_add_missing_cc
{
git show | scripts/get_maintainer.pl --email --norolestats --pattern-depth 1 | while read cc; do
local email name matches
git show | scripts/get_maintainer.pl --email --norolestats --pattern-depth 1 | while read -r cc; do
email="$(echo "$cc" | sed -e 's/.*<//' -e 's/>.*//')"
name=''
......@@ -1968,15 +1970,15 @@ function dim_add_missing_cc
fi
# Don't add main mailing lists
if [ "$email" = "dri-devel@lists.freedesktop.org" -o \
"$email" = "linux-kernel@vger.kernel.org}" ]; then
if [[ "$email" = "dri-devel@lists.freedesktop.org" || \
"$email" = "linux-kernel@vger.kernel.org}" ]]; then
continue
fi
# Variables from the while loop don't propagate,
# print out a 1 on success
matches=$(
git show -s | grep -i "^ Cc:" | sed 's/^ *[Cc][Cc]: *//' | while read testcc; do
git show -s | grep -i "^ Cc:" | sed 's/^ *[Cc][Cc]: *//' | while read -r testcc; do
testemail="$(echo "$testcc" | sed -e 's/.*<//' -e 's/>.*//')"
if [ "$testemail" != "$email" ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment