[empathy] with-session-bus.sh: update from telepathy-glib, fixing bash-specific &> redirection



commit 4e1b91e8cfa635fde04960c43312034b8a54d8e1
Author: Simon McVittie <simon mcvittie collabora co uk>
Date:   Wed May 26 11:08:34 2010 +0100

    with-session-bus.sh: update from telepathy-glib, fixing bash-specific &> redirection

 tools/with-session-bus.sh |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/tools/with-session-bus.sh b/tools/with-session-bus.sh
index 519b9b1..063bd7e 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
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]