summaryrefslogtreecommitdiffstats
path: root/win/config_ti.py
blob: 4facaff1d56f0ab0240f675e88efce8f52604de3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os, shutil
from wb import preprocess, home_fn, autogen

def main(config):
    src = os.path.join(home_fn(config['TISRC']), config['DDKVER_MAJOR'])
    dest = home_fn('tapinstall')
    shutil.rmtree(dest, ignore_errors=True)
    shutil.copytree(src, dest)
    preprocess(config,
               in_fn=os.path.join(dest, 'sources.in'),
               out_fn=os.path.join(dest, 'sources'),
               if_prefix='!',
               head_comment='# %s\n\n' % autogen)

# if we are run directly, and not loaded as a module

if __name__ == "__main__":
    from wb import config
    main(config)