#!/bin/sh

# cd to the directory where this script lives
cd `dirname $0`

# navigato is either in ../share/etc/navigato or ../../share/etc/navigato

if test -f ../share/etc/navigato; then
    etcdir=`cd ../share/etc; pwd`
elif test -f ../../share/etc/navigato; then
    etcdir=`cd ../../share/etc; pwd`
else
    echo "Cannot find Source-Navigator's startup script."
fi

TCL_LIBRARY=$etcdir
export TCL_LIBRARY

# Run SN inside GDB
#echo "set args -file "$etcdir/navigato" ${1+"$@"}" > gdb.run
#exec gdb --command gdb.run ./hyper

# Run SN
exec "./hyper" -file "$etcdir/navigato" ${1+"$@"}
