| 1 |
|
#!/bin/csh -fe |
| 2 |
< |
# SCCSid "$SunId$ LBL" |
| 2 |
> |
# RCSid: $Id$ |
| 3 |
|
# Install correct version of trad for wish or wish4.0 |
| 4 |
|
# |
| 5 |
|
set instdir = $1 |
| 9 |
|
|
| 10 |
|
set TDIFFS = (`ls | sed -n 's/3\.6\.tcl$//p'`) |
| 11 |
|
|
| 12 |
< |
set WISHCOMS = ( wish4.{3,2,1,0} wish ) |
| 12 |
> |
set WISHCOMS = ( wish4.{3,2,1,0} wish8.0 wish ) |
| 13 |
|
|
| 14 |
|
foreach w ( $WISHCOMS ) |
| 15 |
|
foreach d ($path) |
| 24 |
|
echo "Cannot find wish executable in current path -- trad not installed." |
| 25 |
|
exit 1 |
| 26 |
|
endif |
| 27 |
< |
if ( $wishcom:t == wish ) set oldwish |
| 27 |
> |
if ("`file $wishcom`" =~ "*shell script*") then |
| 28 |
> |
set wishcom="/bin/sh" |
| 29 |
> |
endif |
| 30 |
|
|
| 31 |
|
echo "Installing trad using $wishcom" |
| 32 |
|
|
| 38 |
|
endif |
| 39 |
|
(cd $libdir ; rm -f $TLIBFILES) |
| 40 |
|
cp $TLIBFILES $libdir |
| 39 |
– |
if ($?oldwish) then |
| 40 |
– |
foreach i ($TDIFFS) |
| 41 |
– |
rm -f $libdir/$i.tcl |
| 42 |
– |
cp ${i}3.6.tcl $libdir/$i.tcl |
| 43 |
– |
end |
| 44 |
– |
endif |