SOURCES: QtCurve-Gtk2-mailto.patch (NEW) - use shell constructs in...
glen
glen at pld-linux.org
Thu Dec 6 04:10:14 CET 2007
Author: glen Date: Thu Dec 6 03:10:14 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use shell constructs instead of subshells
---- Files affected:
SOURCES:
QtCurve-Gtk2-mailto.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/QtCurve-Gtk2-mailto.patch
diff -u /dev/null SOURCES/QtCurve-Gtk2-mailto.patch:1.1
--- /dev/null Thu Dec 6 04:10:14 2007
+++ SOURCES/QtCurve-Gtk2-mailto.patch Thu Dec 6 04:10:09 2007
@@ -0,0 +1,67 @@
+--- mozilla/mailto.sh~ 2007-12-06 05:04:09.650687151 +0200
++++ mozilla/mailto.sh 2007-12-06 05:04:13.870503260 +0200
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ #
+ # Taken from http://rignesnet.tzo.com/articles/mailto_helper.html
+@@ -7,13 +7,13 @@
+
+ MAILTO_URL="$@"
+
+-app=`kreadconfig --file emaildefaults --group PROFILE_Default --key EmailClient --default kmail`
++app=$(kreadconfig --file emaildefaults --group PROFILE_Default --key EmailClient --default kmail)
+
+-if [ "$app" == "" ] ; then
++if [ -z "$app" ]; then
+ app=kmail
+ fi
+
+-case `basename $app` in
++case "${app##*/}" in
+ "mozilla-thunderbird" | "thunderbird" | "evolution")
+ $app "$MAILTO_URL"
+ ;;
+@@ -21,21 +21,27 @@
+ kmailservice "$MAILTO_URL"
+ ;;
+ *)
+- #Strip off the protocol
+- MAIL_DATA=$(echo "$MAILTO_URL" | /bin/sed -s 's/^mailto://I')
+-
+- #Get Recipient and strip it off
+- RECIPIENT=$(echo "$MAIL_DATA" | cut -d? -f1 -)
+- MAIL_DATA=$(echo "$MAIL_DATA" | /bin/sed -s "s/^$RECIPIENT//")
+-
+- #Get Subject,BCC, and CC
+- SUBJECT=$(echo "$MAIL_DATA" | \
+- /bin/sed -s 's/.*?subject=//I' | /bin/sed -s 's/?.*//')
+- BCC=$(echo "$MAIL_DATA" | /bin/sed -s 's/.*?bcc=//I' | \
+- /bin/sed -s 's/?.*//')
+- CC=$(echo "$MAIL_DATA" | /bin/sed -s 's/.*?cc=//I' | \
+- /bin/sed -s 's/?.*//')
++ # Strip off the protocol
++ MAIL_DATA=${MAILTO_URL#mailto:}
+
++ # Get Recipient and strip it off
++ RECIPIENT=${MAIL_DATA%%\?*}
++ MAIL_DATA=${MAIL_DATA#*\?}
++
++ SUBJECT= BCC= CC=
++ # Get Subject,BCC, and CC
++ if [ "${MAIL_DATA#*subject=}" != "${MAIL_DATA}" ]; then
++ SUBJECT=${MAIL_DATA#*subject=}
++ SUBJECT=${SUBJECT%%&*}
++ fi
++ if [ "${MAIL_DATA#*bcc=}" != "${MAIL_DATA}" ]; then
++ BCC=${MAIL_DATA#*bcc=}
++ BCC=${BCC%%&*}
++ fi
++ if [ "${MAIL_DATA#*cc=}" != "${MAIL_DATA}" ]; then
++ CC=${MAIL_DATA#*cc=}
++ CC=${CC%%&*}
++ fi
+ $app "$RECIPIENT" -b "$BCC" -c "$CC" -s "$SUBJECT"
+ ;;
+ esac
================================================================
More information about the pld-cvs-commit
mailing list