]> git.ozlabs.org Git - next-scripts/blobdiff - build_msg
various updates
[next-scripts] / build_msg
index 5c5273adc77662f2f7cd42cc10306eeff59c2c08..6cff217bd4e0584a8f834472eaad93e18fb15eb8 100755 (executable)
--- a/build_msg
+++ b/build_msg
@@ -5,12 +5,23 @@ log=../merge.log
 control=../real_control
 [ -f real_control ] && control=real_control
 
-branch=$(grep '^Merging ' $log | tail -1 | sed 's/^Merging //')
-branch=${branch#quilt/}
-branch=${branch%%/*}
+branch=""
+[ "$1" = "-t" ] && {
+        branch=$2
+        shift 2
+}
 
-contact=$(sed -n "/    $branch /s/     .*$//p" $control)
+[ "$branch" ] || {
+       branch=$(grep '^Merging ' $log | tail -1 | sed 's/^Merging //' | sed 's/ .*$//')
+       branch=${branch%%/*}
+}
 
-sylpheed --compose "mailto:$contact?Cc=linux-next@vger.kernel.org,%20linux-kernel@vger.kernel.org&Subject=linux-next: $branch tree build failure&Body=Hi ,%0A\
+contact=$(awk -F '     ' '$3=="'"$branch"'" { print $1; }' $control)
+greeting=${contact%% *}
+greeting=${greeting#\"}
+[ "${contact%,*}" = "${contact}" ] || greeting="all"
+
+sylpheed --compose "mailto:$contact?Cc=linux-next@vger.kernel.org,%20linux-kernel@vger.kernel.org&Subject=linux-next: build failure after merge of the $branch tree&Body=Hi $greeting,%0A\
 %0A\
-Today's linux-next build () failed like this:"
+After merging the $branch tree, today's linux-next build ()%0A\
+failed like this:"