mkver.py 266 B

123456789101112
  1. import sys
  2. if __name__ == '__main__':
  3. with open(sys.argv[1], 'r') as f:
  4. data = f.readline()
  5. beg = data.find('(') + 1
  6. end = data.find(')')
  7. version = data[beg:end]
  8. print('#pragma once')
  9. print('#define DEBIAN_VERSION "%s"' % version)