From 683981857753c672355dfcefb4122c2f824b7ddc Mon Sep 17 00:00:00 2001 From: TheWhiteDog9487 <60037547+TheWhiteDog9487@users.noreply.github.com> Date: Mon, 8 May 2023 01:55:20 +0000 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=A0aarch64=E6=9E=B6?= =?UTF-8?q?=E6=9E=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 21 ++++++++++++++------- language.cpp | 5 +++++ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 91f8503..bbc98bb 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,16 @@ # 一键切换Ubuntu(和Debian)系统到简体中文 ## 测试通过的系统 +### **x86_64:** |系统名称|版本| |-|-| |Debian|11.6.0| |Ubuntu|22.04 LTS 20.04 LTS| +### **aarch64:** +|系统名称|版本| +|-|-| +|Debian|11.5| + ## 使用方法 确保已经安装wget或者有其他方法可以传输文件 ```shell @@ -12,16 +18,17 @@ apt update && apt install -y wget ``` 下载程序 +### **x86_64:** ```shell wget https://raw.githubusercontent.com/TheWhiteDog9487/ubuntu-language-onekey-zh_cn/main/language ``` -运行程序 +### **aarch64:** ```shell -sudo chmod o+x language -sudo ./language +wget https://raw.githubusercontent.com/TheWhiteDog9487/ubuntu-language-onekey-zh_cn/main/language_arm ``` -## 提示 -这个程序现在只适配了Debian和Ubuntu的x86版本,ARM架构和采用这两个系统作为底板的下游分支可用性未知。 -短时间内我无法适配ARM架构,我根本就没这个设备。 -如果你需要,可以尝试修改源代码之后自行构建。 +运行程序 +```shell +sudo chmod u+x language +sudo ./language +``` \ No newline at end of file diff --git a/language.cpp b/language.cpp index 2cb6c34..b01c0b2 100644 --- a/language.cpp +++ b/language.cpp @@ -82,8 +82,13 @@ int main() { exit(-1);} else if (OS == "Linux") { if (get_linux_distro_name().find("Ubuntu") != string::npos){ + cout << "检测到您使用的系统为:" << get_linux_distro_name() << endl; Ubuntu();} if (get_linux_distro_name().find("Debian") != string::npos){ + cout << "检测到您使用的系统为:" << get_linux_distro_name() << endl; + Debian();} + if (get_linux_distro_name().find("Armbian") != string::npos){ + cout << "检测到您使用的系统为:" << get_linux_distro_name() << endl; Debian();} else { exit(-1); }} else if (OS == "未知"){