更新 OpenWrt/upload.sh

Signed-off-by: zhao <zhao@noreply.localhost>
This commit is contained in:
zhao 2025-04-02 00:55:35 +08:00
parent 328ce7fe71
commit fe3dd3c652

View File

@ -9,12 +9,11 @@ echo "➜ 下载GitHub Release文件..."
# 根据架构选择对应的tag
if [ "$model" = "x86_64" ]; then
TAG="OpenWrt-X86_64-24.10"
RELEASE_URL="https://api.github.com/repos/oppen321/ZeroWrt-Action/git/refs/tags/OpenWrt-X86_64-24.10"
elif [ "$model" = "rockchip" ]; then
TAG="OpenWrt-Rockchip-24.10"
RELEASE_URL="https://api.github.com/repos/oppen321/ZeroWrt-Action/git/refs/tags/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')
if [ -z "$ASSETS" ]; then
@ -29,3 +28,5 @@ for url in $ASSETS; do
echo "正在下载: $(basename "$url")"
wget -q --show-progress "$url"
done
rename 's/^openwrt/zerowrt-plus-$(date "+%Y%m%d")/' openwrt*