From 88acd1900fd3a098fbd455f442286e66fe287e57 Mon Sep 17 00:00:00 2001 From: pointer-to-bios Date: Thu, 4 Apr 2024 20:55:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9Bdepcheck?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/depcheck | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/scripts/depcheck b/scripts/depcheck index 9b20fda..295d7f1 100755 --- a/scripts/depcheck +++ b/scripts/depcheck @@ -49,15 +49,17 @@ for mod in kernel_modules: print(" " + color['lpink'] + f"{mod}" + color['reset'] + " exists.") else: print(" " + color['lred'] + f"{mod}" + color['reset'] + " not found.") - print("Kernel module " + - color['lred'] + f"{mod}" + color['reset'] + " is not installed.") + print( + "Kernel module " + + color['lred'] + f"{mod}" + color['reset'] + " is not installed.") exit(-1) # 检查软件依赖 pathsenv = os.environ.get("PATH").split(":") for software, progs in softwares.items(): - print("Checking " + color['lcyan'] + - f"{software}" + color['reset'] + " ...") + print( + "Checking " + color['lcyan'] + + f"{software}" + color['reset'] + " ...") for program in progs: exists = False for path in pathsenv: @@ -65,15 +67,19 @@ for software, progs in softwares.items(): exists = True break if exists: - print(" " + color['lyellow'] + - f"{program}" + color['reset'] + " existed.") + print( + " " + color['lyellow'] + + f"{program}" + color['reset'] + " existed.") else: - print(" " + color['lred'] + - f"{program}" + color['reset'] + " not found.") + print( + " " + color['lred'] + + f"{program}" + color['reset'] + " not found.") - print("Software " + color['lred'] + f"{software}" + - color['reset'] + " is not installed or completed.") + print( + "Software " + color['lred'] + f"{software}" + + color['reset'] + " is not installed or completed.") exit(-2) -print("All dependencies are " + - color['lgreen'] + "satisfied." + color['reset']) +print( + "All dependencies are " + + color['lgreen'] + "satisfied." + color['reset'])