From 328ce7fe71a157021856813c0cb7a26b9b9dca85 Mon Sep 17 00:00:00 2001 From: zhao Date: Wed, 2 Apr 2025 00:45:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20OpenWrt/upload.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhao --- OpenWrt/upload.sh | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/OpenWrt/upload.sh b/OpenWrt/upload.sh index 029ccde..766bc0a 100644 --- a/OpenWrt/upload.sh +++ b/OpenWrt/upload.sh @@ -8,18 +8,11 @@ REPO="oppen321/ZeroWrt-Action" echo "➜ 下载GitHub Release文件..." # 根据架构选择对应的tag -case "$model" in - "x86_64") - TAG="OpenWrt-X86_64-24.10" - ;; - "rockchip") - TAG="OpenWrt-Rockchip-24.10" - ;; - *) - echo "❌ 不支持的架构: $model" - exit 1 - ;; -esac +if [ "$model" = "x86_64" ]; then + TAG="OpenWrt-X86_64-24.10" +elif [ "$model" = "rockchip" ]; then + TAG="OpenWrt-Rockchip-24.10" +fi RELEASE_URL="https://api.github.com/repos/$REPO/releases/tags/$TAG" ASSETS=$(curl -sSL "$RELEASE_URL" | jq -r '.assets[] | .browser_download_url')