#!/bin/sh

# $Id: run,v 1.5 2003/07/11 09:38:50 guruz Exp $

# This is where the configuration stuff is stored.
export GTK_GNUTELLA_DIR=$HOME/.gtk-gnutella

# turn on core dumps and delete old dump
ulimit -S -c unlimited
rm -f core

# run gtk-gnutella and start gdb on a core dump
src/gtk-gnutella
if [ -e core ] ; then { 
    gdb src/gtk-gnutella core
    DIR=`date "+core%Y.%m.%d.%H.%M.%S"`
    mkdir "$DIR"
    cp src/gtk-gnutella "$DIR"
    cp core "$DIR"
} 
fi
