-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwaf
More file actions
executable file
·27 lines (20 loc) · 720 Bytes
/
waf
File metadata and controls
executable file
·27 lines (20 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python3
import subprocess
import os.path as p
import sys
d = p.dirname(p.realpath(__file__))
waf_light = p.join(d, 'modules', 'waf', 'waf-light')
python = sys.executable
try:
subprocess.check_call([python, waf_light] + sys.argv[1:])
except subprocess.CalledProcessError as e:
if e.returncode != 2 or p.isfile(waf_light):
sys.exit(1)
print('Missing waf submodule. Trying to get it')
try:
subprocess.check_call(['git', 'submodule', 'update', '--init',
'modules/waf'])
except subprocess.CalledProcessError:
print('Could not update submodule', file=sys.stderr)
sys.exit(1)
print('Submodules OK, try running again')