From 0bda2196d8d826d2bfe214e9a02d5e124d4645ae Mon Sep 17 00:00:00 2001 From: "Rob Kendrick (fatigue)" Date: Sun, 4 Nov 2012 15:40:37 +0000 Subject: Make test-nsgtk more generic and use installed version when people have set up a suitable environment with a PREFIX --- test-netsurf | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 test-netsurf (limited to 'test-netsurf') diff --git a/test-netsurf b/test-netsurf new file mode 100755 index 000000000..ec0a660e3 --- /dev/null +++ b/test-netsurf @@ -0,0 +1,38 @@ +#!/bin/sh +# This file is part of NetSurf, http://netsurf-browser.org/ +# Licensed under the GNU General Public License, +# http://www.opensource.org/licenses/gpl-license +# Copyright 2007 Rob Kendrick +# +# This launcher script is meant only for running nsgtk from inside the +# build tree, with some debugging enabled. It is not meant for day-to-day +# or packaged use! + +if [ -d ~/.netsurf ]; then + LOG=~/.netsurf/log.txt +elif [ -d /tmp ]; then + LOG=/tmp/netsurf-log.txt +else + LOG=netsurf-log.txt +fi + +echo $0: using $LOG as logfile + +ulimit -c unlimited + +NETSURFRES=`dirname $0`/gtk/res/ +export NETSURFRES + +if [ "x$1" = "x--gdb" ]; then + GDB="gdb --args" + echo + echo + echo "**********************************************************" + echo "Remember to type 'run' and press ENTER once gdb has loaded" + echo "**********************************************************" + echo + echo + shift +fi + +exec $GDB `dirname $0`/nsgtk -v "$@" 2>&1 | tee $LOG -- cgit v1.2.3