#!/bin/bash # shellcheck source=./common.sh . "$(dirname "$0")/common.sh" '' log="$LOG_FILE" if [ -f merge.log ]; then log='merge.log' fi branch= if [ "$1" = '-t' ]; then branch="$2" shift 2 fi kconfig= if [ "$1" = '-c' ]; then kconfig="$2" shift 2 fi cc='Linux Next Mailing List , Linux Kernel Mailing List ' if [ -z "$branch" ]; then branch=$(grep '^Merging ' "$log" | tail -n 1 | sed 's/^Merging \([^ /]*\).*$/\1/') fi contact=$(get_contacts "$branch") subject=${1//BRANCH/$branch} filter="sed -e 's/BRANCH/$branch/g'" if [ "$kconfig" ]; then filter="$filter -e 's/KCONFIG_NAME/$kconfig/g'" fi filter="$filter | fmt -s" { printf 'Hi all,\n\n'; eval "$filter"; } | "$bin_dir"/send_email "linux-next: $subject" "$contact" "$cc" exit 0