summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2012-08-22 00:57:40 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2012-08-22 00:57:40 (GMT)
commit1579c6f17438b4c7347465b7e7846265bc463790 (patch)
tree4e01ceecddebb3b872072dbda5bff465fe580c2c
parent021ea3e951aafe189e8a8c466624cb95b324de07 (diff)
downloadtip-bot-1579c6f17438b4c7347465b7e7846265bc463790.zip
tip-bot-1579c6f17438b4c7347465b7e7846265bc463790.tar.gz
tip-bot-1579c6f17438b4c7347465b7e7846265bc463790.tar.bz2
tip-bot-1579c6f17438b4c7347465b7e7846265bc463790.tar.xz
Extract out the boundary string...
-rwxr-xr-xrobot.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/robot.sh b/robot.sh
index 123cda6..ff909af 100755
--- a/robot.sh
+++ b/robot.sh
@@ -64,15 +64,17 @@ max_mails=100
LAST_FAILSAFE=$(cat "$topdir"/last_failsafe)
if [ x"$NEW_HEAD" != x"$LAST_FAILSAFE" ]; then
echo "$NEW_HEAD" > "$topdir"/last_failsafe
+ # A mostly arbitrary string as long as it doesn't occur anywhere...
+ boundary='----------73zc71qfWjUfy1i6'
cat > "$tmpdir"/failsafe.$$ <<EOF
From: tip-bot alert <$SENDER>
To: H. Peter Anvin <hpa@zytor.com>, Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de>
Subject: tip-bot failsafe: $count emails
User-Agent: tip-bot failsafe
MIME-Version: 1.0
-Content-type: multipart/mixed; boundary="----------73zc71qfWjUfy1i6"
+Content-type: multipart/mixed; boundary="$boundary"
-------------73zc71qfWjUfy1i6
+--$boundary
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -82,7 +84,7 @@ EOF
git shortlog --no-walk --format='%h %s' `cat "$tmpdir"/revlist.$$` \
>> "$tmpdir"/failsafe.$$
cat >> "$tmpdir"/failsafe.$$ <<EOF
-------------73zc71qfWjUfy1i6
+--$boundary
Content-Type: text/plain; charset=UTF-8; name="commit.lst"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="commit.lst"
@@ -90,7 +92,7 @@ Content-Disposition: attachment; filename="commit.lst"
EOF
cat "$tmpdir"/revlist.$$ >> "$tmpdir"/failsafe.$$
cat >> "$tmpdir"/failsafe.$$ <<EOF
-------------73zc71qfWjUfy1i6--
+--$boundary--
EOF
sendmail -i -t < "$tmpdir"/failsafe.$$
rm -f "$tmpdir"/failsafe.$$