#!/bin/sh
#
# Thanks to Alain Nissen for this - I couldn't be fashed to do it!!
#
if test -z "$DISPLAY"
then
  echo You must run this program under the X-Window System
  exit 1
fi
IFS="${IFS=   }"
old_ifs="$IFS"
IFS="${IFS}:"
if test -z "$*"
then
    progs="wish8.0 wish4.2 wish4.1 wish wish"
else 
    progs="tclsh8.0 tclsh4.2 tclsh"
fi
my_wish=
for wish in $progs
do
  for dir in $PATH
  do
    test -f "$dir/$wish" && my_wish="$dir/$wish"
    test ! -z "$my_wish" && break
  done
  test ! -z "$my_wish" && break
done
IFS=$old_ifs
if test ! -z "$my_wish"
then
  exec $my_wish installer/install.tcl $*
fi
echo Cannot find a tcl/tk interpreter!!
exit 1

