From 067c6f506bbfeeb173395b4699812c108bbd354d Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 31 May 2021 15:11:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E6=94=AF=E6=8C=81a?= =?UTF-8?q?rmv8=E3=80=81aarch64=20cpu=E6=9E=B6=E6=9E=84=E4=B8=8B=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E6=A0=B8=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 103 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 61 insertions(+), 42 deletions(-) diff --git a/install.sh b/install.sh index a724e3d..4842809 100644 --- a/install.sh +++ b/install.sh @@ -3,15 +3,46 @@ # ------------------------------------------------------------- # 检查系统 export LANG=en_US.UTF-8 +echoContent() { + case $1 in + # 红色 + "red") + # shellcheck disable=SC2154 + ${echoType} "\033[31m${printN}$2 \033[0m" + ;; + # 天蓝色 + "skyBlue") + ${echoType} "\033[1;36m${printN}$2 \033[0m" + ;; + # 绿色 + "green") + ${echoType} "\033[32m${printN}$2 \033[0m" + ;; + # 白色 + "white") + ${echoType} "\033[37m${printN}$2 \033[0m" + ;; + "magenta") + ${echoType} "\033[31m${printN}$2 \033[0m" + ;; + # 黄色 + "yellow") + ${echoType} "\033[33m${printN}$2 \033[0m" + ;; + esac +} checkSystem() { if [[ -n $(find /etc -name "redhat-release") ]] || grep " + exit 1 + ;; + esac fi + else + echoContent red " 无法识别此CPU架构,默认amd64、x86_64--->" + xrayCoreCPUVendor="Xray-linux-64" + v2rayCoreCPUVendor="v2ray-linux-64" + trojanGoCPUVendor="trojan-go-linux-amd64" fi } @@ -61,9 +109,9 @@ initVar() { echoType='echo -e' # 核心支持的cpu版本 - xrayCoreCPUVendor="Xray-linux-64" - v2rayCoreCPUVendor="v2ray-linux-64" - trojanGoCPUVendor="trojan-go-linux-amd64" + xrayCoreCPUVendor="" + v2rayCoreCPUVendor="" + trojanGoCPUVendor="" # 域名 domain= @@ -315,35 +363,6 @@ readConfigHostPathUUID # ------------------------------------------------------------- -echoContent() { - case $1 in - # 红色 - "red") - # shellcheck disable=SC2154 - ${echoType} "\033[31m${printN}$2 \033[0m" - ;; - # 天蓝色 - "skyBlue") - ${echoType} "\033[1;36m${printN}$2 \033[0m" - ;; - # 绿色 - "green") - ${echoType} "\033[32m${printN}$2 \033[0m" - ;; - # 白色 - "white") - ${echoType} "\033[37m${printN}$2 \033[0m" - ;; - "magenta") - ${echoType} "\033[31m${printN}$2 \033[0m" - ;; - # 黄色 - "yellow") - ${echoType} "\033[33m${printN}$2 \033[0m" - ;; - esac -} - # 初始化安装目录 mkdirTools() { mkdir -p /etc/v2ray-agent/tls @@ -3715,7 +3734,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.4.30" + echoContent green "当前版本:v2.4.31" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus