#!/bin/bash set -euo pipefail # ZyHive (引巢) 安装引导脚本 # 支持:curl / wget / apt / yum / dnf / apk / brew INSTALLER="https://install.zyling.ai/zyhive.sh" _install_curl() { echo "未检测到 curl,正在自动安装..." if command -v apt-get &>/dev/null; then sudo apt-get install -y -q curl elif command -v apt &>/dev/null; then sudo apt install -y -q curl elif command -v yum &>/dev/null; then sudo yum install -y -q curl elif command -v dnf &>/dev/null; then sudo dnf install -y -q curl elif command -v apk &>/dev/null; then sudo apk add --no-cache -q curl elif command -v brew &>/dev/null; then brew install curl elif command -v wget &>/dev/null; then wget -qO- "$INSTALLER" | bash exit $? else echo "错误:未找到 curl 或 wget,请先手动安装 curl。" exit 1 fi } if ! command -v curl &>/dev/null; then _install_curl fi curl -fsSL "$INSTALLER" | bash