3
# Copyright (C) 2010 David Mohr <david@mcbf.net>
5
# This library is free software; you can redistribute it and/or
6
# modify it under the terms of the GNU Lesser General Public
7
# License as published by the Free Software Foundation; either
8
# version 2.1 of the License, or (at your option) any later version.
10
# See the file COPYING for the full license text.
12
# midori-dev: Run, update or debug Midori from git.
14
# Adjust this to where you have your git sources
15
DEVDIR=~/src/xfce/midori/git
17
# Location of stdout and stderr from running midori
20
#-----------------------------------------------------------------------------
22
BIN=_build_/default/midori/midori
23
BASENAME=`basename $0`
29
CMD=`echo $BASENAME | sed 's/^midori-//'`
31
echo "I'm confused, basename $BASENAME is not in the midori-<FOO> format"
35
if [ $CMD == "dev" ]; then
36
# No command was given through a symlink,
37
# so check the first parameter instead
44
exec ./waf build --run "$@" >& $LOG
50
NAME=`date '+%Y%m%d-%H%M%S'`
54
echo "It is recommended to save a description of the cause of the crash"
55
echo "Enter one line now, or press <ENTER> to continue"
60
echo "Saving crash info..."
62
echo $DESC > $CRASH/description
63
echo " (gdb will take some time)"
64
gdb $BIN core --batch -ex 'thread apply all bt' >& $CRASH/backtrace
65
echo " Backtrace is in $DEVDIR/$CRASH/backtrace."
70
if [ -n "$CAT" ]; then
79
Usage: Create a symlink midori-<CMD>, or run 'midori-dev <CMD>'
81
git: run the current git version
82
gdb: open the last core dump in gdb
83
save: saves relevant information about the last crash
84
so that it can be analyzed later
85
pull: pulls the latest updates from the repository