ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/tradinstall.csh
Revision: 2.10
Committed: Wed May 1 16:47:54 2019 UTC (4 years, 11 months ago) by greg
Content type: application/x-csh
Branch: MAIN
Changes since 2.9: +2 -2 lines
Log Message:
Changed default path for wish to "/usr/bin/wish"

File Contents

# Content
1 #!/bin/csh -fe
2 # RCSid: $Id: tradinstall.csh,v 2.9 2015/10/20 15:51:58 greg Exp $
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.{6,5,4,3,2,1,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 ("`file $wishcom`" =~ "*shell script*") then
28 set wishcom="/bin/sh"
29 endif
30
31 echo "Installing trad using $wishcom"
32
33 sed -e "1s|/usr/bin/wish|$wishcom|" \
34 -e "s|^set radlib .*|set radlib $libdir|" trad.wsh > $instdir/trad
35 chmod 755 $instdir/trad
36 if (! -d $libdir) then
37 mkdir $libdir
38 endif
39 (cd $libdir ; rm -f $TLIBFILES)
40 cp $TLIBFILES $libdir