1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
#! /bin/sh
GXINE_ROOT="`expr match "$GXINE_ROOT" '[^/]' >/dev/null || pwd`/`dirname "$0"`"
if test "$1" = -h || test "$1" = --help; then
cat <<EOF
Usage:
$0 ...
$0 --gdb ...
In the latter form, options and MRLs are passed to gdb via 'set args'.
EOF
exec "$GXINE_ROOT/src/gxine" --help
fi
unset USEGDB
if test "$1" = --gdb; then
USEGDB=y
shift
fi
export GXINE_PLUGINDIR="$GXINE_ROOT/browser_plugin"
export GXINE_BINDIR="$GXINE_ROOT/src"
export GXINE_LOGODIR="$GXINE_ROOT/pixmaps"
export GXINE_PIXMAPDIR="$GXINE_ROOT/pixmaps"
export GXINE_ICONDIR="$GXINE_ROOT/pixmaps"
export GXINE_MISCDIR="$GXINE_ROOT/misc"
export GXINE_CONFDIR="$GXINE_ROOT/misc"
cleanup ()
{
test "$GDBCMD" != '' && rm -f "$GDBCMD"
}
if test "$USEGDB" = y; then
# bash: exec gdb "$GXINE_ROOT/src/gxine" <(echo set args "$@")
unset GDBCMD
trap cleanup EXIT
GDBCMD="`tempfile`"
echo set args "$@" >>"$GDBCMD"
gdb "$GXINE_ROOT/src/gxine" -x "$GDBCMD"
else
exec "$GXINE_ROOT/src/gxine" "$@"
fi
|