summaryrefslogtreecommitdiffstats
path: root/test cases/common/105 generatorcustom/catter.py
blob: c2726723c4d8e86b86528639ca435a807a96bc35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env python3

import sys

output = sys.argv[-1]
inputs = sys.argv[1:-1]

with open(output, 'w') as ofile:
    ofile.write('#pragma once\n')
    for i in inputs:
        with open(i) as ifile:
            content = ifile.read()
        ofile.write(content)
        ofile.write('\n')