aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2010-05-26 18:08:34 +0800
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-05-26 18:08:34 +0800
commit4e1b91e8cfa635fde04960c43312034b8a54d8e1 (patch)
tree8df7687f25178cbe93aa67ad1c4e92467e8c2dc6 /tools
parent961f968f204547c34ad419786447d1904783497f (diff)
downloadgsoc2013-empathy-4e1b91e8cfa635fde04960c43312034b8a54d8e1.tar
gsoc2013-empathy-4e1b91e8cfa635fde04960c43312034b8a54d8e1.tar.gz
gsoc2013-empathy-4e1b91e8cfa635fde04960c43312034b8a54d8e1.tar.bz2
gsoc2013-empathy-4e1b91e8cfa635fde04960c43312034b8a54d8e1.tar.lz
gsoc2013-empathy-4e1b91e8cfa635fde04960c43312034b8a54d8e1.tar.xz
gsoc2013-empathy-4e1b91e8cfa635fde04960c43312034b8a54d8e1.tar.zst
gsoc2013-empathy-4e1b91e8cfa635fde04960c43312034b8a54d8e1.zip
with-session-bus.sh: update from telepathy-glib, fixing bash-specific &> redirection
Diffstat (limited to 'tools')
-rw-r--r--tools/with-session-bus.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/with-session-bus.sh b/tools/with-session-bus.sh
index 519b9b1c8..063bd7e17 100644
--- a/tools/with-session-bus.sh
+++ b/tools/with-session-bus.sh
@@ -15,6 +15,7 @@ set -e
me=with-session-bus
dbus_daemon_args="--print-address=5 --print-pid=6 --fork"
+sleep=0
usage ()
{
@@ -29,6 +30,11 @@ usage ()
while test "z$1" != "z--"; do
case "$1" in
+ --sleep=*)
+ sleep="$1"
+ sleep="${sleep#--sleep=}"
+ shift
+ ;;
--session)
dbus_daemon_args="$dbus_daemon_args --session"
shift
@@ -73,11 +79,15 @@ 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 &
+ > $me-$$.dbus-monitor-logs 2>&1 &
fi
"$@" || e=$?
+if test $sleep != 0; then
+ sleep $sleep
+fi
+
trap - INT HUP TERM
cleanup