aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/mkver.py
blob: 2101032770cc6fb1b95be730ef0c18e70f1da13f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
from __future__ import print_function
import sys

if __name__ == '__main__':
    with open(sys.argv[1], 'r') as f:
        data = f.readline()

    beg = data.find('(') + 1
    end = data.find(')')
    version = data[beg:end]

    print('#pragma once')
    print('#define DEBIAN_VERSION "%s"' % version)