dotfiles/INSTALL_ALL_THE_THINGS

24 lines
664 B
Plaintext
Raw Normal View History

2016-02-05 18:05:20 +00:00
#!/usr/bin/env python
import os
def get_functions():
ns = {}
fn = os.path.join(os.path.dirname(__file__), 'wscript')
with open(fn) as f:
code = compile(f.read(), fn, 'exec')
eval(code, ns, ns)
return ns
if __name__ == '__main__':
2016-02-05 18:19:08 +00:00
if input("Are you sure you want to install (allthethings)? [Y/N]: ").lower() == 'y':
waf_scripts = []
for key, func in get_functions().items():
if type(func).__name__ == 'function':
waf_scripts.append(key)
2016-02-05 18:05:20 +00:00
2016-02-05 18:19:08 +00:00
for func in waf_scripts:
cmd = "waf {}".format(func)
print("Running {}".format(cmd))
os.system(cmd)