From 7224102fb03914d45a032a66f23e764c3eccc8c3 Mon Sep 17 00:00:00 2001 From: Todd Naugle Date: Mon, 14 Feb 2011 16:41:28 +0000 Subject: [PATCH] added -d flag to bundle startup script that will launch ardour inside the debugger git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@8843 d708f5d6-7413-0410-9779-e7cbd77b26cf --- tools/linux_packaging/ardour.sh.in | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/tools/linux_packaging/ardour.sh.in b/tools/linux_packaging/ardour.sh.in index d288cf6159..86edd62770 100644 --- a/tools/linux_packaging/ardour.sh.in +++ b/tools/linux_packaging/ardour.sh.in @@ -1,5 +1,22 @@ #!/bin/sh +while [ $# -gt 0 ] ; do + echo "arg = $1" + case $1 in + + -d) + DEBUG="T"; + shift ;; + *) + #catch all for unknown arguments + echo "" + echo "!!! ERROR !!! - Unknown argument $1" + echo "" + exit 1 + ;; + esac +done + #LD_LIBRARY_PATH needs to be set (empty) so that epa can swap between the original and the bundled version export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} @@ -34,7 +51,12 @@ export LD_LIBRARY_PATH=$INSTALL_DIR/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} sed "s?@ROOTDIR@/modules?$LIB_DIR/modules?" < $ETC_DIR/pango.modules.in > $USER_ARDOUR_DIR/pango.modules sed "s?@ROOTDIR@/loaders?$LIB_DIR/loaders?" < $ETC_DIR/gdk-pixbuf.loaders.in > $USER_ARDOUR_DIR/gdk-pixbuf.loaders -exec $INSTALL_DIR/bin/ardour-%VER% "$@" +if [ "T" = "$DEBUG" ]; then + export ARDOUR_INSIDE_GDB=1 + exec gdb $INSTALL_DIR/bin/ardour-%VER% "$@" +else + exec $INSTALL_DIR/bin/ardour-%VER% "$@" +fi