ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/build_utils/install.py
(Generate patch)

Comparing ray/build_utils/install.py (file contents):
Revision 1.3 by schorsch, Sat Mar 5 00:40:25 2016 UTC vs.
Revision 1.4 by schorsch, Sat Mar 5 13:24:58 2016 UTC

# Line 41 | Line 41 | def install_script(target, source, env):
41                  tf.write(sf.read())
42                  os.chmod(str(t), 00755)
43  
44 + def install_tclscript(target, source, env):
45 +        # XXX posix only for the moment
46 +        for t,s in map(None, target,source):
47 +                bindir = os.path.split(t.get_abspath())[0]
48 +                instdir = os.path.split(bindir)[0]
49 +                tcllibdir = os.path.join(instdir, 'lib', 'tcl')
50 +                sf = open(str(s), 'r')
51 +                tf = open(str(t), 'w')
52 +                # as recommended in the wish manpage
53 +                tf.write('''#!/bin/sh\n''')
54 +                for line in sf.readlines():
55 +                        if line.startswith('#!'):
56 +                                tf.write('### ' + line)
57 +                        if line.startswith('set radlib'):
58 +                                # XXX this should really be handled by an envvar.
59 +                                line = 'set radlib %s\n' % tcllibdir
60 +                        tf.write(line)
61 +                os.chmod(str(t), 00755)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines