7 CONFIG_FILE=./tmp-session-bus.$$.conf
11 echo "$SCRIPTNAME: $*" >&2
16 if test -z "$DBUS_TOP_BUILDDIR" ; then
17 die "Must set DBUS_TOP_BUILDDIR"
20 SERVICE_DIR="$DBUS_TOP_BUILDDIR/test/data/valid-service-files"
21 ESCAPED_SERVICE_DIR=`echo $SERVICE_DIR | sed -e 's/\//\\\\\\//g'`
22 echo "escaped service dir is: $ESCAPED_SERVICE_DIR" >&2
24 if test -z "$SOURCE_CONFIG_FILE"; then
25 SOURCE_CONFIG_FILE="$DBUS_TOP_BUILDDIR/bus/session.conf";
27 ## create a configuration file based on the standard session.conf
28 cat $SOURCE_CONFIG_FILE | \
29 sed -e 's/<standard_session_servicedirs.*$/<servicedir>'$ESCAPED_SERVICE_DIR'<\/servicedir>/g' | \
30 sed -e 's/<include.*$//g' \
33 echo "Created configuration file $CONFIG_FILE" >&2
35 if ! test -e "$DBUS_TOP_BUILDDIR"/bus/dbus-daemon ; then
36 die "$DBUS_TOP_BUILDDIR/bus/dbus-daemon does not exist"
39 PATH="$DBUS_TOP_BUILDDIR"/bus:$PATH
42 ## the libtool script found by the path search should already do this, but
43 LD_LIBRARY_PATH=$DBUS_TOP_BUILDDIR/dbus/.libs:$LD_LIBRARY_PATH
44 export LD_LIBRARY_PATH
45 unset DBUS_SESSION_BUS_ADDRESS
46 unset DBUS_SESSION_BUS_PID
48 $DBUS_TOP_BUILDDIR/tools/dbus-run-session \
49 --config-file="$CONFIG_FILE" \
50 --dbus-daemon="$DBUS_TOP_BUILDDIR/bus/dbus-daemon" \
52 "$WRAPPED_SCRIPT" "$@"