diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-10-22 07:17:35 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-10-22 07:17:35 +0000 |
commit | 6b8c702f06930e113dd6ac0f567f61b48daf4f9b (patch) | |
tree | 624ef165a3c268da898cf6bf74edc2f6d4e6f916 /shell | |
parent | 04e9c21f2e452d580cdbe85b2cef91ff3e1d8bbd (diff) |
INTEGRATION: CWS shellfix01 (1.2.36); FILE MERGED
2004/09/14 07:07:22 obr 1.2.36.2: #i30170# file uris now encoded on-the-fly
2004/09/13 11:59:16 obr 1.2.36.1: #i32602# need to place the quotes inside the variable expansion
Diffstat (limited to 'shell')
-rw-r--r-- | shell/source/unix/misc/senddoc.sh | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh index 737712a5fb64..178ab20144f7 100644 --- a/shell/source/unix/misc/senddoc.sh +++ b/shell/source/unix/misc/senddoc.sh @@ -118,7 +118,7 @@ case `basename $MAILER | sed 's/-.*$//'` in shift ;; --attach) - ATTACH=${ATTACH:-}${ATTACH:+,}$2 + ATTACH=${ATTACH:-}${ATTACH:+,}`echo file://$2 | uri-encode` shift ;; *) @@ -183,8 +183,9 @@ case `basename $MAILER | sed 's/-.*$//'` in shift; done - ${MAILER} --composer ${CC:+--cc} "${CC:-}" ${BCC:+--bcc} "${BCC:-}" ${SUBJECT:+--subject} \ - "${SUBJECT:-}" ${BODY:+--body} "${BODY}" ${ATTACH} "${TO}" + ${MAILER} --composer ${CC:+--cc} ${CC:+"${CC}"} ${BCC:+--bcc} ${BCC:+"${BCC}"} \ + ${SUBJECT:+--subject} ${SUBJECT:+"${SUBJECT}"} ${BODY:+--body} ${BODY:+"${BODY}"} \ + ${ATTACH} ${TO:+"${TO}"} ;; evolution) @@ -229,28 +230,26 @@ case `basename $MAILER | sed 's/-.*$//'` in ${MAILER} "${MAILTO}" & ;; -# FIXME: dtmail dows not accept file urls, so we need to convert them -# to system paths ! -# dtmail) -# -# while [ "$1" != "" ]; do -# case $1 in -# --to) -# TO=${TO:-}${TO:+,}$2 -# shift -# ;; -# --attach) -# ATTACH="${ATTACH:-}${ATTACH:+ } $2" -# shift -# ;; -# *) -# ;; -# esac -# shift; -# done -# -# ${MAILER} ${TO:+-T} ${TO:-} ${ATTACH:+-a} ${ATTACH:-} -# ;; + dtmail) + + while [ "$1" != "" ]; do + case $1 in + --to) + TO=${TO:-}${TO:+,}$2 + shift + ;; + --attach) + ATTACH="${ATTACH:-}${ATTACH:+ } $2" + shift + ;; + *) + ;; + esac + shift; + done + + ${MAILER} ${TO:+-T} ${TO:-} ${ATTACH:+-a} ${ATTACH:-} + ;; *) if [ "$MAILER" != "" ]; then echo "Unsupported mail client: `basename $MAILER | sed 's/-.*^//'`" |