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