#!/bin/sh
#
#  This is a start up script for the Tk/Tcl widget tour.
#
#  Andrew Payne
#  payne@crl.dec.com
#

PWD=`pwd`

#  Set up default wish.  Use installed binary, if not, depend on user's
#  search path.

WISH=/usr/local/bin/wish
if test ! -r "$WISH"; then
	WISH=wish
fi

#  Look for a wish binary in a local directory that is executable on this
#  architecture.  If found, use that, along with the local Tcl and Tk
#  libraries.

for arch in ./bin.*; do
	if test -r $arch/wish; then
		if expr "`file $arch/wish`" : ".*executable.*" >/dev/null
		then
			WISH=$arch/wish
			TCL_LIBRARY=$PWD/lib/tcl
			TK_LIBRARY=$PWD/lib/tk
			export TCL_LIBRARY TK_LIBRARY
			break
		fi
	fi
done

export WISH
$WISH -f ./lib/wtour.tcl ./lessons
