From: Stephen Rothwell Date: Thu, 1 Oct 2020 00:42:22 +0000 (+1000) Subject: send_email: allow multiple cc's and use that in message_helper X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=b36c8c28ee2a4e552ffcdf50b3b0ad80b5ce4e2c;p=next-scripts send_email: allow multiple cc's and use that in message_helper --- diff --git a/message_helper b/message_helper index 78584d4..517fbe9 100755 --- a/message_helper +++ b/message_helper @@ -20,7 +20,8 @@ if [ "$1" = '-c' ]; then shift 2 fi -cc='Linux Next Mailing List , Linux Kernel Mailing List ' +cc=( 'Linux Next Mailing List ' + 'Linux Kernel Mailing List ' ) if [ -z "$branch" ]; then branch=$(grep '^Merging ' "$log" | tail -n 1 | @@ -36,6 +37,6 @@ fi filter="$filter | fmt -s" { printf 'Hi all,\n\n'; eval "$filter"; } | - "$bin_dir"/send_email "linux-next: $subject" "$contact" "$cc" + "$bin_dir"/send_email "linux-next: $subject" "$contact" "${cc[@]}" exit 0 diff --git a/send_email b/send_email index b572b9c..1c0fc4b 100755 --- a/send_email +++ b/send_email @@ -4,16 +4,14 @@ mail_dir=$(realpath --relative-to=. "$(dirname "$0")/../mails") printf -v TARGET '%s/%(i%Y-%m-%d+%s)T.email' "$mail_dir" -1 subject="$1" -to="$2" -cc="$3" +shift +to="$1" +shift { - cat < "$TARGET"