gstreamer/gst/parse/get_flex_version.py
Niklas Hambüchen 8cf0df152a Make get_flex_version.py script executable
Like all other scripts in the same dir.

It has a hashbang, so it should be executable.
2019-08-07 11:10:36 +01:00

11 lines
295 B
Python
Executable file

#!/usr/bin/env python3
import re
import sys
import subprocess
flex = sys.argv[1]
out = subprocess.check_output([flex, '--version'], universal_newlines=True,
stderr=subprocess.STDOUT, stdin=subprocess.DEVNULL)
print(re.search(r'(\d+\.\d+(\.\d+)?)', out).group())