From 867bd0db149bf28c7c776396d4814176d4440e59 Mon Sep 17 00:00:00 2001 From: pexcn Date: Fri, 24 May 2024 22:02:29 +0800 Subject: [PATCH] add .tar.zst sdk support --- .github/workflows/ci.yml | 2 +- build.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b78e748..be450c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: matrix: SDK_URL: - https://downloads.openwrt.org/releases/21.02.5/targets/x86/64/openwrt-sdk-21.02.5-x86-64_gcc-8.4.0_musl.Linux-x86_64.tar.xz - - https://github.com/openwrt-ipq60xx/ci/releases/download/main/openwrt-sdk-qualcommax-ipq60xx_gcc-12.3.0_musl.Linux-x86_64.tar.xz + - https://github.com/openwrt-ipq60xx/ci/releases/download/main/openwrt-sdk-qualcommax-ipq60xx_gcc-13.2.0_musl.Linux-x86_64.tar.zst steps: - name: Checkout sources diff --git a/build.sh b/build.sh index 848042a..2bb559a 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,11 @@ #!/bin/sh download_sdk() { - curl -sSL "$SDK_URL" | tar Jxf - + if [ -z "${SDK_URL##*.tar.zst}" ]; then + curl -sSL "$SDK_URL" | tar --zstd -xf - + else + curl -sSL "$SDK_URL" | tar Jxf - + fi mv openwrt-sdk-* openwrt-sdk }