]> git.ozlabs.org Git - next-scripts/commitdiff
final_msg: automate the creation of the release note
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 5 Jun 2014 01:10:38 +0000 (11:10 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 5 Jun 2014 01:10:38 +0000 (11:10 +1000)
final_msg [new file with mode: 0755]
send_email

diff --git a/final_msg b/final_msg
new file mode 100755 (executable)
index 0000000..5e00dda
--- /dev/null
+++ b/final_msg
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+. "$(dirname $0)/common.sh" ""
+
+to="linux-next@vger.kernel.org"
+cc="linux-kernel@vger.kernel.org"
+subject="linux-next: Tree for $(date --date "5 hours ago" '+%b %-d')"
+prev=$(git tag -l next-* | sort | tail -n 2 | head -n 1 | sed 's/next-//')
+nmc=$(git rev-list --no-merges --count origin/master..HEAD^)
+ss=$(git diff --shortstat -M -C origin/master..HEAD^)
+ntrees=$(wc -l <../etc/control)
+
+sed -e 's/^\(Changes since\) [0-9]*:/\1 '"$prev"':/' \
+    -e 's/^\(Non-merge commits .*:\) [0-9]*/\1 '"$nmc"'/'\
+    -e 's/^ *[0-9]* files changed,.*$/'"$ss"'/' \
+    -e 's/^\(I am currently merging\) [0-9]* /\1 '"$ntrees"' /' \
+    ../last_msg |
+       $(dirname $0)/send_email "$to" "$cc" "$subject"
+
+exit 0
index 84f33657dc86968b5ba693b58a07bf1d37236189..de418730b6a0776d2aaa5e6a49d60c9ca44b98ef 100755 (executable)
@@ -4,12 +4,14 @@ to="$1"
 cc="$2"
 subject="$3"
 
-claws-mail --compose-from-file - <<EOF
+(
+       cat <<EOF
 To: $to
-CC: $cc
+Cc: $cc
 Subject: $subject
 
-$(cat)
 EOF
+       cat
+) | claws-mail --compose-from-file -
 
 exit 0