From bc0abcf67d4ab51e00e7f7f6bbf91e63e2162d07 Mon Sep 17 00:00:00 2001 From: mgb01105731 Date: Sun, 30 Jan 2022 11:18:22 +0800 Subject: [PATCH] Add options for the latest Anolis OS 8. --- centos2anolis.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/centos2anolis.py b/centos2anolis.py index 564a660..7768ca8 100644 --- a/centos2anolis.py +++ b/centos2anolis.py @@ -64,7 +64,7 @@ python-oauth sl-logos yum-rhn-plugin centos-indexhtml' reposdir ='' anolislist7 = ['7.7','7.9'] -anolislist8 = ['8.2','8.4'] +anolislist8 = ['8.2','8.4','8'] try: centosv = str(subprocess.check_output("cat /etc/centos-release | awk '{print $4}'", shell=True), 'utf-8')[:3] print("CentOS version is " + centosv) @@ -234,6 +234,8 @@ def check_version(version): elif centosversion >= 8 and version == "8.4": print("You selected Anolis OS 8.4") repostr_an8 = re.sub(r"/(8)/", "/8.4/", repostr_an8) + elif centosversion >= 8 and version == "8": + print("You selected Latest Anolis OS 8.") else: print("version " + version + " not found, Please Check!") sys.exit(1) @@ -249,6 +251,8 @@ def check_version(version): elif centosversion >= 8 and version == "8.4": print("You selected Anolis OS 8.4") repostr_an8 = re.sub(r"/(8)/", "/8.4/", repostr_an8) + elif centosversion >= 8 and version == "8": + print("You selected Latest Anolis OS 8.") else: print("version " + version + " not found,Please Check!") print("The following version are enabled") -- Gitee