重构内存分配器、增加中断支持、整理rust运行时环境 #4
|
@ -49,15 +49,17 @@ for mod in kernel_modules:
|
||||||
print(" " + color['lpink'] + f"{mod}" + color['reset'] + " exists.")
|
print(" " + color['lpink'] + f"{mod}" + color['reset'] + " exists.")
|
||||||
else:
|
else:
|
||||||
print(" " + color['lred'] + f"{mod}" + color['reset'] + " not found.")
|
print(" " + color['lred'] + f"{mod}" + color['reset'] + " not found.")
|
||||||
print("Kernel module " +
|
print(
|
||||||
color['lred'] + f"{mod}" + color['reset'] + " is not installed.")
|
"Kernel module " +
|
||||||
|
color['lred'] + f"{mod}" + color['reset'] + " is not installed.")
|
||||||
exit(-1)
|
exit(-1)
|
||||||
|
|
||||||
# 检查软件依赖
|
# 检查软件依赖
|
||||||
pathsenv = os.environ.get("PATH").split(":")
|
pathsenv = os.environ.get("PATH").split(":")
|
||||||
for software, progs in softwares.items():
|
for software, progs in softwares.items():
|
||||||
print("Checking " + color['lcyan'] +
|
print(
|
||||||
f"{software}" + color['reset'] + " ...")
|
"Checking " + color['lcyan'] +
|
||||||
|
f"{software}" + color['reset'] + " ...")
|
||||||
for program in progs:
|
for program in progs:
|
||||||
exists = False
|
exists = False
|
||||||
for path in pathsenv:
|
for path in pathsenv:
|
||||||
|
@ -65,15 +67,19 @@ for software, progs in softwares.items():
|
||||||
exists = True
|
exists = True
|
||||||
break
|
break
|
||||||
if exists:
|
if exists:
|
||||||
print(" " + color['lyellow'] +
|
print(
|
||||||
f"{program}" + color['reset'] + " existed.")
|
" " + color['lyellow'] +
|
||||||
|
f"{program}" + color['reset'] + " existed.")
|
||||||
else:
|
else:
|
||||||
print(" " + color['lred'] +
|
print(
|
||||||
f"{program}" + color['reset'] + " not found.")
|
" " + color['lred'] +
|
||||||
|
f"{program}" + color['reset'] + " not found.")
|
||||||
|
|
||||||
print("Software " + color['lred'] + f"{software}" +
|
print(
|
||||||
color['reset'] + " is not installed or completed.")
|
"Software " + color['lred'] + f"{software}" +
|
||||||
|
color['reset'] + " is not installed or completed.")
|
||||||
exit(-2)
|
exit(-2)
|
||||||
|
|
||||||
print("All dependencies are " +
|
print(
|
||||||
color['lgreen'] + "satisfied." + color['reset'])
|
"All dependencies are " +
|
||||||
|
color['lgreen'] + "satisfied." + color['reset'])
|
||||||
|
|
Reference in New Issue