freebsd-ports/devel/xdg-utils/files/patch-scripts_xdg-email
Koop Mast e3cadc4fc6 Update to git snapshot.
Major changes are:
- Add/import support for Enlightenment, MATE, KDE4 and GNOME3.
- Fix typo in the xdg-email patch that has survived detection in well forever [1]
- Enable stage support.

Submitted by:	eadler@ [1]
2013-09-24 15:27:08 +00:00

27 lines
1.1 KiB
Text

--- scripts/xdg-email.orig 2013-08-24 17:56:29.000000000 +0200
+++ scripts/xdg-email 2013-08-24 18:03:28.000000000 +0200
@@ -395,13 +395,13 @@
MAILTO=$(echo "$MAILTO" | sed 's/^/to=/' | sed 's/?/\&/')
fi
- MAILTO=$(echo "$MAILTO" | sed 's/&/\n/g')
+ MAILTO=$(echo "$MAILTO" | tr '&' '\n')
TO=$(echo "$MAILTO" | grep '^to=' | sed 's/^to=//' | awk '{ printf "%s,",$0 }')
CC=$(echo "$MAILTO" | grep '^cc=' | sed 's/^cc=//' | awk '{ printf "%s,",$0 }')
BCC=$(echo "$MAILTO" | grep '^bcc=' | sed 's/^bcc=//' | awk '{ printf "%s,",$0 }')
SUBJECT=$(echo "$MAILTO" | grep '^subject=' | tail -n 1)
BODY=$(echo "$MAILTO" | grep '^body=' | tail -n 1)
- ATTACH=$(echo "$MAILTO" | sed 's/^attach=/\n\nfile:\/\//g' | awk '/^file:/ { printf "%s,",$0 }' | sed 's/,$//')
+ ATTACH=$(for attachment in $(echo "$MAILTO" | sed -ne 's,^attach=,file://,gp') ; do printf "%s," "$attachment" ; done); ATTACH=${ATTACH%,}
if [ -z "$TO" ] ; then
NEWMAILTO=
@@ -563,7 +563,7 @@
options=
mailto=
-utf8="iconv -t utf8"
+utf8="iconv -t UTF-8"
while [ $# -gt 0 ] ; do
parm="$1"
shift