]> git.ozlabs.org Git - next-scripts/commitdiff
message_helper: substitute KCONFIG_NAME and put message through fmt
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 22 Jul 2015 00:55:28 +0000 (10:55 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 22 Jul 2015 00:57:46 +0000 (10:57 +1000)
build_msg
build_warn
merge_msg
message_helper

index f56db1033d903fae7bdb01cc95d09d5a0939d7b2..6df0061245acfa2a98b03a8b3155ba5fac7aa757 100755 (executable)
--- a/build_msg
+++ b/build_msg
@@ -3,8 +3,7 @@
 subject="build failure after merge of the BRANCH tree"
 
 $(dirname $0)/message_helper "$@" "$subject" <<EOF
-After merging the BRANCH tree, today's linux-next build (KCONFIG_NAME)
-failed like this:
+After merging the BRANCH tree, today's linux-next build (KCONFIG_NAME) failed like this:
 EOF
 
 exit 0
index 17ab2aa45169590495ed60a36bddb044fa57aa8c..68834770dcebc69e18b68c116d3e47ca20c63c6e 100755 (executable)
@@ -3,8 +3,7 @@
 subject="build warning after merge of the BRANCH tree"
 
 $(dirname $0)/message_helper "$@" "$subject" <<EOF
-After merging the BRANCH tree, today's linux-next build ()
-produced this warning:
+After merging the BRANCH tree, today's linux-next build (KCONFIG_NAME) produced this warning:
 EOF
 
 exit 0
index 62227bdd2f84df0590fb4294688837366e613308..e6e87521d24615a78eb0577fef88445ff37994e9 100755 (executable)
--- a/merge_msg
+++ b/merge_msg
@@ -38,8 +38,7 @@ from the FIXME tree and commit:
 
 from the BRANCH tree.
 
-I fixed it up (see below) and can carry the fix as necessary (no action
-is required).
+I fixed it up (see below) and can carry the fix as necessary (no action is required).
 EOF
 
 exit 0
index 0b14b26a86a0531302dca8e34fda049fa30a7565..fa3644c4cadc73c333d1229b00ae209cc378c8a5 100755 (executable)
@@ -13,6 +13,14 @@ branch=""
         shift 2
 }
 
+kconfig=""
+[ "$1" = "-c" ] && {
+        kconfig=$2
+        shift 2
+}
+
+cc="linux-next@vger.kernel.org, linux-kernel@vger.kernel.org"
+
 [ "$branch" ] || {
        branch=$(grep '^Merging ' $log | tail -1 | sed 's/^Merging //' | sed 's/ .*$//')
        branch=${branch%%/*}
@@ -24,11 +32,15 @@ greeting=${greeting#\"}
 [ "${contact%,*}" = "${contact}" ] || greeting="all"
 
 subject="${1//BRANCH/$branch}"
+filter="sed -e \"s/BRANCH/$branch/g\""
+[ "$kconfig" ] &&
+       filter="$filter -e \"s/KCONFIG_NAME/$kconfig/g\""
+filter="$filter | fmt"
 
-$(dirname $0)/send_email "$contact" "linux-next@vger.kernel.org, linux-kernel@vger.kernel.org" "linux-next: $subject" <<EOF
+$(dirname $0)/send_email "$contact" "$cc" "linux-next: $subject" <<EOF
 Hi $greeting,
 
-$(sed "s/BRANCH/$branch/g")
+$(eval $filter)
 EOF
 
 exit 0