ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/tradinstall.csh
Revision: 2.7
Committed: Sat Feb 22 02:07:30 2003 UTC (21 years, 1 month ago) by greg
Content type: application/x-csh
Branch: MAIN
CVS Tags: rad3R7P2, rad3R7P1, rad4R0, rad3R5, rad3R6, rad3R6P1, rad3R8, rad3R9
Changes since 2.6: +5 -5 lines
Log Message:
Changes and check-in for 3.5 release
Includes new source files and modifications not recorded for many years
See ray/doc/notes/ReleaseNotes for notes between 3.1 and 3.5 release

File Contents

# Content
1 #!/bin/csh -fe
2 # RCSid: $Id$
3 # Install correct version of trad for wish or wish4.0
4 #
5 set instdir = $1
6 set libdir = $2
7
8 set TLIBFILES = ( *[a-z].tcl *.hlp trad.icon tclIndex )
9
10 set TDIFFS = (`ls | sed -n 's/3\.6\.tcl$//p'`)
11
12 set WISHCOMS = ( wish4.{3,2,1,0} wish8.0 wish )
13
14 foreach w ( $WISHCOMS )
15 foreach d ($path)
16 if (-x $d/$w) then
17 set wishcom = $d/$w
18 break
19 endif
20 end
21 if ( $?wishcom ) break
22 end
23 if (! $?wishcom) then
24 echo "Cannot find wish executable in current path -- trad not installed."
25 exit 1
26 endif
27 # if ( $wishcom:t == wish ) then
28 # set wishcom="$wishcom -f"
29 # set oldwish
30 # endif
31
32 echo "Installing trad using $wishcom"
33
34 sed -e "1s|/usr/local/bin/wish4\.0|$wishcom|" \
35 -e "s|^set radlib .*|set radlib $libdir|" trad.wsh > $instdir/trad
36 chmod 755 $instdir/trad
37 if (! -d $libdir) then
38 mkdir $libdir
39 endif
40 (cd $libdir ; rm -f $TLIBFILES)
41 cp $TLIBFILES $libdir
42 if ($?oldwish) then
43 foreach i ($TDIFFS)
44 rm -f $libdir/$i.tcl
45 cp ${i}3.6.tcl $libdir/$i.tcl
46 end
47 endif