#!/bin/sh
# Run the bleeding version of owl from my cvs build directory and run
# it under gdb in case of crashes.  Copy the binary to a tmp location
# first in case it disappears on us.

TERM=dtterm
export dtterm

stty susp undef  #to keep ctrl-z from working

# added 3/5
# LD_LIBRARY_PATH=/mit/jdaniel/project/mpatrol/arch/$ATHENA_SYS/lib
# export LD_LIBRARY_PATH

cd  # switch to $HOME before running to not confuse gdbinit
BUILD=/mit/jdaniel/project/owl/build-cvs
DATE=`date +%y%m%d%H%M%S`

if [ "x$TMP" = "x" ]; then
  TMP=/tmp
fi
echo "Copying the binary ..."
cp -p $BUILD/owl $TMP/owl-$DATE

# run under efence
#echo Setting up variables to use efence
#LD_PRELOAD=libefence.so.2.1
#export LD_PRELOAD
#LD_LIBRARY_PATH=/mit/outland/lib
#export LD_LIBRARY_PATH

echo "Starting owl ..."
# gdb -cd $BUILD -command $BUILD/.gdbinit \
$TMP/owl-$DATE
