ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/tradinstall.csh
(Generate patch)

Comparing ray/src/util/tradinstall.csh (file contents):
Revision 2.2 by greg, Wed Sep 20 12:55:18 1995 UTC vs.
Revision 2.8 by greg, Wed Oct 26 20:06:17 2011 UTC

# Line 1 | Line 1
1 < #!/bin/csh -f
2 < # SCCSid "$SunId$ LBL"
1 > #!/bin/csh -fe
2 > # RCSid: $Id$
3   # Install correct version of trad for wish or wish4.0
4   #
5   set instdir = $1
# Line 9 | Line 9 | set TLIBFILES = ( *[a-z].tcl *.hlp trad.icon tclIndex
9  
10   set TDIFFS = (`ls | sed -n 's/3\.6\.tcl$//p'`)
11  
12 < foreach d ($path)
13 <        if (-x $d/wish4.0) then
14 <                set wishcom = $d/wish4.0
15 <                break
16 <        endif
17 < end
18 < if (! $?wishcom) then
12 > set WISHCOMS = ( wish4.{3,2,1,0} wish8.0 wish )
13 >
14 > foreach w ( $WISHCOMS )
15          foreach d ($path)
16 <                if (-x $d/wish) then
17 <                        set wishcom = "$d/wish -f"
16 >                if (-x $d/$w) then
17 >                        set wishcom = $d/$w
18                          break
19                  endif
20          end
21 <        if (! $?wishcom) then
22 <                echo "Cannot find wish executable in current path -- trad not installed."
23 <                exit 1
24 <        endif
25 <        set oldwish
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/local/bin/wish4\.0|$wishcom|" \
34          -e "s|^set radlib .*|set radlib $libdir|" trad.wsh > $instdir/trad
36 if ($status) exit 1
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
40 if ($?oldwish) then
41        foreach i ($TDIFFS)
42                (cd $libdir ; rm -f $i.tcl)
43                cp ${i}3.6.tcl $libdir/$i.tcl
44        end
45 endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines