#!/bin/sh

#
# PGBrowse startup script - sets defaults and determines
# architecture before exec'ing wishpqx on the startup
# Tcl script
#
# $Id: pgbrowse,v 1.1 1993/12/06 18:15:44 jimbo Exp jimbo $
#


PGBROWSE=${PGBROWSE-/usr/local/postgres95/pg95browse}
PGHOST=${PGHOST-localhost}
PGPORT=${PGPORT-5432}
PGSTARTUP=$PGBROWSE/lib/init.tcl

[ -f $PGSTARTUP ] || {
    echo "Error:  $PGBROWSE is not the PGBROWSE directory."
    exit 1
}

WISH=$PGBROWSE/../bin/pgtkxsh
[ -f $WISH ] || {
    echo "Error:  Can't find pgtksh:  $WISH"
    exit 1
}

export PGBROWSE PGHOST PGPORT WISH

exec $WISH -f $PGSTARTUP $*
