Skip to content

Commit d9ec0d3

Browse files
committed
Merge branch 'pw/update-thunderbird-patch-inline' into jch
Update bitrotten instruction for sending patches via Thunderbird (in contrib/). * pw/update-thunderbird-patch-inline: contrib: update thunderbird-patch-inline
2 parents 5fc0b5e + 044aea2 commit d9ec0d3

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

contrib/thunderbird-patch-inline/README

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
appp.sh is a script that is supposed to be used together with ExternalEditor
2-
for Mozilla Thunderbird. It will let you include patches inline in e-mails
3-
in an easy way.
1+
appp.sh is a script that is supposed to be used together with
2+
ExternalEditorRevived for Mozilla Thunderbird. It will let you include
3+
patches inline in e-mails in an easy way.
44

55
Usage:
66
- Generate the patch with git format-patch.
@@ -14,7 +14,7 @@ will be moved to the section between the --- and the diffstat.
1414

1515
All S-O-B:s and Cc:s in the patch will be added to the CC list.
1616

17-
To set it up, just install External Editor and tell it to use appp.sh as the
18-
editor.
17+
To set it up, just install External Editor Revived and tell it to use
18+
appp.sh as the editor.
1919

2020
Zenity is a required dependency.

contrib/thunderbird-patch-inline/appp.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#!/bin/sh
22
# Copyright 2008 Lukas Sandström <[email protected]>
33
#
4-
# AppendPatch - A script to be used together with ExternalEditor
4+
# AppendPatch - A script to be used together with ExternalEditorRevived
55
# for Mozilla Thunderbird to properly include patches inline in e-mails.
66

7-
# ExternalEditor can be downloaded at http://globs.org/articles.php?lng=en&pg=2
7+
# ExternalEditorRevived extension can be installed using the Add-ons
8+
# manager in thunderbird, the source is available at
9+
# https://github.com/Frederick888/external-editor-revived
810

911
CONFFILE=~/.appprc
1012

11-
SEP="-=-=-=-=-=-=-=-=-=# Don't remove this line #=-=-=-=-=-=-=-=-=-"
1213
if [ -e "$CONFFILE" ] ; then
1314
LAST_DIR=$(grep -m 1 "^LAST_DIR=" "${CONFFILE}"|sed -e 's/^LAST_DIR=//')
1415
cd "${LAST_DIR}"
@@ -25,8 +26,12 @@ fi
2526

2627
cd - > /dev/null
2728

29+
# The headers are separated from the message body by a blanks
30+
# line. However the message uses CR LF line ending so on platforms
31+
# where the native line ending is LF we see a line with a single CR.
32+
SEP="$(printf '^\r\\{0,1\\}$')"
2833
SUBJECT=$(sed -n -e '/^Subject: /p' "${PATCH}")
29-
HEADERS=$(sed -e '/^'"${SEP}"'$/,$d' $1)
34+
HEADERS=$(sed -e "/${SEP}/"',$d' $1)
3035
BODY=$(sed -e "1,/${SEP}/d" $1)
3136
CMT_MSG=$(sed -e '1,/^$/d' -e '/^---$/,$d' "${PATCH}")
3237
DIFF=$(sed -e '1,/^---$/d' "${PATCH}")
@@ -37,7 +42,7 @@ CCS=$(printf '%s\n%s\n' "$CMT_MSG" "$HEADERS" | sed -n -e 's/^Cc: \(.*\)$/\1,/gp
3742
echo "$SUBJECT" > $1
3843
echo "Cc: $CCS" >> $1
3944
echo "$HEADERS" | sed -e '/^Subject: /d' -e '/^Cc: /d' >> $1
40-
echo "$SEP" >> $1
45+
echo >> $1
4146

4247
echo "$CMT_MSG" >> $1
4348
echo "---" >> $1

0 commit comments

Comments
 (0)