--- ray/src/util/tradinstall.csh 1995/11/07 09:58:43 2.3 +++ ray/src/util/tradinstall.csh 2003/02/22 02:07:30 2.7 @@ -1,5 +1,5 @@ #!/bin/csh -fe -# SCCSid "$SunId$ LBL" +# RCSid: $Id: tradinstall.csh,v 2.7 2003/02/22 02:07:30 greg Exp $ # Install correct version of trad for wish or wish4.0 # set instdir = $1 @@ -9,25 +9,25 @@ set TLIBFILES = ( *[a-z].tcl *.hlp trad.icon tclIndex set TDIFFS = (`ls | sed -n 's/3\.6\.tcl$//p'`) -foreach d ($path) - if (-x $d/wish4.0) then - set wishcom = $d/wish4.0 - break - endif -end -if (! $?wishcom) then +set WISHCOMS = ( wish4.{3,2,1,0} wish8.0 wish ) + +foreach w ( $WISHCOMS ) foreach d ($path) - if (-x $d/wish) then - set wishcom = "$d/wish -f" + if (-x $d/$w) then + set wishcom = $d/$w break endif end - if (! $?wishcom) then - echo "Cannot find wish executable in current path -- trad not installed." - exit 1 - endif - set oldwish + if ( $?wishcom ) break +end +if (! $?wishcom) then + echo "Cannot find wish executable in current path -- trad not installed." + exit 1 endif +# if ( $wishcom:t == wish ) then +# set wishcom="$wishcom -f" +# set oldwish +# endif echo "Installing trad using $wishcom"