[Telepathy-commits] [telepathy-salut/master] Update with-session-bus.sh from telepathy-glib
Alban Crequy
alban.crequy at collabora.co.uk
Tue Nov 25 03:59:25 PST 2008
This new version of with-session-bus.sh comes from the telepathy-glib git
repository:
|commit 9c6a27f7b1796abfd0e30ec0e38a7bdbf3aa3863
|Author: Alban Crequy <alban.crequy at collabora.co.uk>
|Date: Wed Sep 10 11:42:17 2008 +0100
|
| tools/with-session-bus.sh: Better explanation for usage
|
|commit 241d6e35c946bee2c8112f3f444fe9e2bfdaa9de
|Author: Alban Crequy <alban.crequy at collabora.co.uk>
|Date: Tue Sep 9 18:13:39 2008 +0100
|
| with-session-bus.sh: Fork dbus-monitor if requested
|
| If $WITH_SESSION_BUS_FORK_DBUS_MONITOR is set, fork dbus-monitor:
| dbus-monitor $WITH_SESSION_BUS_FORK_DBUS_MONITOR_OPT
---
tests/twisted/tools/with-session-bus.sh | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/tests/twisted/tools/with-session-bus.sh b/tests/twisted/tools/with-session-bus.sh
index 26d9f24..519b9b1 100644
--- a/tests/twisted/tools/with-session-bus.sh
+++ b/tests/twisted/tools/with-session-bus.sh
@@ -4,7 +4,7 @@
# The canonical location of this program is the telepathy-glib tools/
# directory, please synchronize any changes with that copy.
#
-# Copyright (C) 2007 Collabora Ltd. <http://www.collabora.co.uk/>
+# Copyright (C) 2007-2008 Collabora Ltd. <http://www.collabora.co.uk/>
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
@@ -20,6 +20,10 @@ usage ()
{
echo "usage: $me [options] -- program [program_options]" >&2
echo "Requires write access to the current directory." >&2
+ echo "" >&2
+ echo "If \$WITH_SESSION_BUS_FORK_DBUS_MONITOR is set, fork dbus-monitor" >&2
+ echo "with the arguments in \$WITH_SESSION_BUS_FORK_DBUS_MONITOR_OPT." >&2
+ echo "The output of dbus-monitor is saved in $me-<pid>.dbus-monitor-logs" >&2
exit 2
}
@@ -65,6 +69,13 @@ dbus-daemon $dbus_daemon_args
e=0
DBUS_SESSION_BUS_ADDRESS="`cat $me-$$.address`"
export DBUS_SESSION_BUS_ADDRESS
+
+if [ -n "$WITH_SESSION_BUS_FORK_DBUS_MONITOR" ] ; then
+ echo -n "Forking dbus-monitor $WITH_SESSION_BUS_FORK_DBUS_MONITOR_OPT" >&2
+ dbus-monitor $WITH_SESSION_BUS_FORK_DBUS_MONITOR_OPT \
+ &> $me-$$.dbus-monitor-logs &
+fi
+
"$@" || e=$?
trap - INT HUP TERM
--
1.5.6.5
More information about the Telepathy-commits
mailing list