aboutsummaryrefslogtreecommitdiffstats
path: root/build.py
blob: a7005492fe4aca9b0b3f058d645b76eab4febd6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python
import os

source_dir = 'src'
output_dir = 'ftplugin'


def build():
    py_src = file(os.path.join(source_dir, 'rst_tables.py')).read()
    vim_src = file(os.path.join(source_dir, 'base.vim')).read()
    combined_src = vim_src.replace('__PYTHON_SOURCE__', py_src)
    if not os.path.exists(output_dir):
        os.mkdir(output_dir)
    output_path = os.path.join(output_dir, 'rst_tables.vim')
    file(output_path, 'w').write(combined_src)

if __name__ == '__main__':
    build()