Debian Codegraph @

test cases/common/182 find override/subdir/gencodegen.py.in

raw
1 #!/usr/bin/env python3
2
3 import sys
4 import pathlib
5
6 [ifilename, ofilename] = sys.argv[1:3]
7
8 ftempl = '''int %s(void) {
9 return @NUMBER@;
10 }
11 '''
12
13 d = pathlib.Path(ifilename).read_text().split('\n')[0].strip()
14
15 pathlib.Path(ofilename).write_text(ftempl % d)