增加对Arch分支系统的自动配置支持
This commit is contained in:
@@ -79,8 +79,8 @@ print_step "检查必要工具..."
|
||||
if ! command -v git &> /dev/null; then
|
||||
print_warn "git 未安装,正在安装..."
|
||||
case $OS in
|
||||
opensuse*|suse*|opensuse-tumbleweed|opensuse-slowroll)
|
||||
zypper install -y git
|
||||
opensuse*|suse*|opensuse-tumbleweed|opensuse-slowroll|opensuse-leap)
|
||||
zypper install -y git-core
|
||||
;;
|
||||
ubuntu|debian|linuxmint)
|
||||
apt update -qq && apt install -y git
|
||||
@@ -91,6 +91,9 @@ if ! command -v git &> /dev/null; then
|
||||
alpine)
|
||||
apk add git
|
||||
;;
|
||||
arch|archlinux|manjaro|endeavouros)
|
||||
pacman -S --noconfirm git
|
||||
;;
|
||||
*)
|
||||
print_error "无法识别包管理器,请手动安装 git"
|
||||
exit 1
|
||||
@@ -105,10 +108,11 @@ fi
|
||||
if ! command -v curl &> /dev/null; then
|
||||
print_warn "curl 未安装,正在安装..."
|
||||
case $OS in
|
||||
opensuse*|suse*|opensuse-tumbleweed|opensuse-slowroll) zypper install -y curl ;;
|
||||
opensuse*|suse*|opensuse-tumbleweed|opensuse-slowroll|opensuse-leap) zypper install -y curl ;;
|
||||
ubuntu|debian|linuxmint) apt install -y curl ;;
|
||||
centos|rhel|fedora|rocky|almalinux) yum install -y curl ;;
|
||||
alpine) apk add curl ;;
|
||||
arch|archlinux|manjaro|endeavouros) pacman -S --noconfirm curl ;;
|
||||
*) print_error "无法安装 curl"; exit 1 ;;
|
||||
esac
|
||||
print_success "curl 安装完成"
|
||||
@@ -120,10 +124,11 @@ fi
|
||||
if ! command -v wget &> /dev/null; then
|
||||
print_warn "wget 未安装,正在安装..."
|
||||
case $OS in
|
||||
opensuse*|suse*|opensuse-tumbleweed|opensuse-slowroll) zypper install -y wget ;;
|
||||
opensuse*|suse*|opensuse-tumbleweed|opensuse-slowroll|opensuse-leap) zypper install -y wget ;;
|
||||
ubuntu|debian|linuxmint) apt install -y wget ;;
|
||||
centos|rhel|fedora|rocky|almalinux) yum install -y wget ;;
|
||||
alpine) apk add wget ;;
|
||||
arch|archlinux|manjaro|endeavouros) pacman -S --noconfirm wget ;;
|
||||
*) print_warn "wget 未安装,但不影响主要功能" ;;
|
||||
esac
|
||||
else
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ sudo bash deploy.sh
|
||||
|
||||
| 步骤 | 说明 |
|
||||
|---|---|
|
||||
| 检测系统 | 自动识别 OpenSUSE / Ubuntu / Debian / CentOS / Alpine |
|
||||
| 检测系统 | 自动识别 OpenSUSE(猫猫特有的夹带私货) / Ubuntu / Debian / CentOS / Alpine |
|
||||
| 检测 CPU 架构 | 自动适配 x86_64 / ARM64 / ARMv7 |
|
||||
| 安装依赖 | git / curl / wget(如未安装) |
|
||||
| 安装 Go | 从国内镜像下载,自动配置代理 |
|
||||
|
||||
Reference in New Issue
Block a user