meson/test cases/common/109 generatorcustom/catter.py

15 lines
297 B
Python
Executable File

#!/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, 'r') as ifile:
content = ifile.read()
ofile.write(content)
ofile.write('\n')