https://bugs.documentfoundation.org/show_bug.cgi?id=108591
--- Comment #7 from David H. Gutteridge <[email protected]> ---
Part of this patch set won't necessarily behave as intended, depending on the
OS.
diff --git a/shell/source/unix/misc/senddoc.sh
b/shell/source/unix/misc/senddoc.sh
index 4519e01f26e2..8985711a2c01 100755
--- a/shell/source/unix/misc/senddoc.sh
+++ b/shell/source/unix/misc/senddoc.sh
@@ -393,6 +393,8 @@ case `basename "$MAILER" | sed 's/-.*$//'` in
MAILER=/usr/bin/kde-open
elif [ -x /usr/bin/xdg-open ] ; then
MAILER=/usr/bin/xdg-open
+ elif type -p xdg-open >/dev/null 2>&1 ; then
+ MAILER="$(type -p xdg-open)"
else
echo "Unsupported mail client: `basename $MAILER | sed
's/-.*^//'`"
exit 2
This uses "type -p", but that's not portable.
For example, with Debian's dash as /bin/sh:
$ /bin/sh
$ type -p xdg-open
-p: not found
xdg-open is /usr/bin/xdg-open
$ echo $?
127
Or with NetBSD's /bin/sh (with newer than 8.0):
$ /bin/sh
$ type -p xdg-open
type: usage: type name...
$ echo $?
2
"command -v" is probably a better choice here.
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs