From 1caa557c4b0e37cab977165bbb5d356415a9e963 Mon Sep 17 00:00:00 2001 From: smeb y <48400087+a3165458@users.noreply.github.com> Date: Mon, 27 May 2024 16:09:52 +0800 Subject: [PATCH] Update Quili.sh --- Quili.sh | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/Quili.sh b/Quili.sh index fdf041f..f5f258e 100644 --- a/Quili.sh +++ b/Quili.sh @@ -58,18 +58,37 @@ sudo apt update && sudo apt -y upgrade # 安装wget、screen和git等组件 sudo apt install git ufw bison screen binutils gcc make bsdmainutils -y -# 安装GVM +# 下载并安装gvm bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) source /root/.gvm/scripts/gvm +# 获取系统架构 +ARCH=$(uname -m) + +# 安装并使用go1.4作为bootstrap gvm install go1.4 -B gvm use go1.4 export GOROOT_BOOTSTRAP=$GOROOT -gvm install go1.17.13 -gvm use go1.17.13 -export GOROOT_BOOTSTRAP=$GOROOT -gvm install go1.20.2 -gvm use go1.20.2 + +# 根据系统架构安装相应的Go版本 +if [ "$ARCH" = "x86_64" ]; then + gvm install go1.17.13 + gvm use go1.17.13 + export GOROOT_BOOTSTRAP=$GOROOT + + gvm install go1.20.2 + gvm use go1.20.2 +elif [ "$ARCH" = "aarch64" ]; then + gvm install go1.17.13 -B + gvm use go1.17.13 + export GOROOT_BOOTSTRAP=$GOROOT + + gvm install go1.20.2 -B + gvm use go1.20.2 +else + echo "Unsupported architecture: $ARCH" + exit 1 +fi # 克隆仓库 git clone https://github.com/quilibriumnetwork/ceremonyclient