diff --git a/deploy.sh b/deploy.sh index a385caa..955593a 100644 --- a/deploy.sh +++ b/deploy.sh @@ -2,15 +2,9 @@ # ============================================================ # frpc-console 一键部署脚本 (Docker 优先) -# 支持:Linux x86_64 / ARM64 / ARMv7 -# 自动安装:git / curl / wget / Docker -# # 用法: -# ./deploy.sh # 交互式选择通道 -# ./deploy.sh --channel lts # 指定 LTS 通道 -# ./deploy.sh --channel preview # 指定 Preview 通道 -# ./deploy.sh --yes # 跳过确认 -# ./deploy.sh --check # 只检测环境 +# curl -sSL .../deploy.sh | sudo bash +# curl -sSL .../deploy.sh | sudo bash -s -- --channel preview # ============================================================ set -e @@ -25,18 +19,12 @@ if [ -t 1 ]; then MAGENTA='\033[0;35m' NC='\033[0m' else - RED='' - GREEN='' - YELLOW='' - BLUE='' - CYAN='' - MAGENTA='' - NC='' + RED=''; GREEN=''; YELLOW=''; BLUE=''; CYAN=''; MAGENTA=''; NC='' fi # ---------- 配置 ---------- REPO_URL="https://git.whitetop.xyz/lxh2875931338/frpc-console.git" -BRANCH="main" # 默认 main,select_channel 会根据选择修改 +BRANCH="main" WORK_DIR="/tmp/frpc-console-build" DEFAULT_PORT=9300 DEFAULT_DEPLOY_DIR="/opt/frpc-console" @@ -296,6 +284,7 @@ select_channel() { else BRANCH="main" fi + print_info "使用命令行参数: ${CHANNEL} 通道 (${BRANCH} 分支)" return fi