mirror of https://github.com/lukechilds/node.git
Ben Noordhuis
13 years ago
4 changed files with 35 additions and 33 deletions
@ -1,20 +0,0 @@ |
|||
#!/usr/bin/env python |
|||
|
|||
import os |
|||
import re |
|||
import subprocess |
|||
import sys |
|||
|
|||
|
|||
def DoMain(*args): |
|||
cc = os.environ.get('CC', 'gcc') |
|||
stdin, stderr = os.pipe() |
|||
subprocess.call([cc, '-v'], stderr=stderr) |
|||
output = os.read(stdin, 4096) |
|||
match = re.search("\ngcc version (\d+\.\d+\.\d+)", output) |
|||
if match: |
|||
print(match.group(1)) |
|||
|
|||
|
|||
if __name__ == '__main__': |
|||
DoMain(*sys.argv) |
Loading…
Reference in new issue