diff options
author | Holger Levsen <holger@layer-acht.org> | 2016-11-23 11:42:00 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-11-23 11:42:00 +0100 |
commit | 07cb4559359c81b334d51423018a28cc029b7118 (patch) | |
tree | e670b184bd72e5a08d699aeb9c5611dc3ccdafa7 | |
parent | d1d7a4dffc4589c50d26ffdb96bb0411f0b34931 (diff) | |
download | jenkins.debian.net-07cb4559359c81b334d51423018a28cc029b7118.tar.xz |
fixup 5fce99cb4: YOLO: try to parse quoted-printable continuation lines
Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rwxr-xr-x | bin/email2irc.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/email2irc.sh b/bin/email2irc.sh index 58233c30..02f10efc 100755 --- a/bin/email2irc.sh +++ b/bin/email2irc.sh @@ -67,7 +67,7 @@ while read -r line ; do if [ "$HEADER" = "false" ] && [ -z "$MY_LINE" ] ; then MY_LINE=$line debug123 "#1" MY_LINE $MY_LINE - if [ ! -z "$MY_2ND_LINE" ] ; then + if [ -z "$MY_2ND_LINE" ] ; then # if this is a multipart email it comes from the email extension plugin if [ "${line:0:7}" = "------=" ] || [ "${line:0:9}" = "Content-T" ] ; then debug123 "#2" line $line @@ -81,14 +81,14 @@ while read -r line ; do # if $MY_LINE ends with '=', then append the next line to $MY_LINE, # changing the '=' to a single space. if [[ $MY_LINE =~ ^(.*)=$ ]] ; then - MY_2ND_LINE=$MY_LINE + MY_2ND_LINE="$MY_LINE" MY_LINE="" fi else # deal with quoted-printable continuation lines: 2nd line/time # if $MY_LINE ends with '=', then append the next line to $MY_LINE, # TODO: changing the '=' to a single space. - MY_LINE="$MY_LINE $MY_2ND_LINE" + MY_LINE="$MY_2ND_LINE $MY_LINE" debug123 "#5" MY_LINE $MY_LINE debug123 "#6" MY_2ND_LINE $MY_2ND_LINE fi |