[WS] Inform about unexisting compilers and qemu
git-svn-id: svn://kolibrios.org@9411 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -1,4 +1,21 @@
|
||||
import shutil
|
||||
|
||||
def log(s, end = "\n"):
|
||||
print(s, end = end, flush = True)
|
||||
|
||||
def require_tools(names):
|
||||
assert(type(names) == list or type(names) == tuple)
|
||||
for name in names:
|
||||
assert(type(name) == str)
|
||||
|
||||
not_found = []
|
||||
for name in names:
|
||||
if shutil.which(name) is None:
|
||||
not_found.append(name)
|
||||
|
||||
if len(not_found) != 0:
|
||||
log("Sorry, I can't find some tools:")
|
||||
for name in not_found:
|
||||
print(f"- {name}")
|
||||
exit(1)
|
||||
|
||||
|
Reference in New Issue
Block a user