From a637aea04610e28fd47e7f64c9e926246be414c2 Mon Sep 17 00:00:00 2001 From: zhao Date: Sun, 15 Jun 2025 08:12:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Mediatek.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhao --- Mediatek.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Mediatek.sh b/Mediatek.sh index e70c6a1..dc16e82 100644 --- a/Mediatek.sh +++ b/Mediatek.sh @@ -12,6 +12,11 @@ export RES='\e[0m' # GitHub 变量 export github="github.com" +# $CURL_BAR +if curl --help | grep progress-bar >/dev/null 2>&1; then + CURL_BAR="--progress-bar"; +fi + # 分组函数(GitHub Actions 支持) GROUP= group() { @@ -67,6 +72,16 @@ elif [ "$platform" = "Mediatek_mt7986" ]; then fi endgroup +# 加载缓存 +group "加载缓存" +curl -L https://$github/oppen321/openwrt_caches/releases/download/OpenWrt_Toolchain_Cache/toolchain_gcc8_mediatek.tar.zst -o toolchain.tar.zst $CURL_BAR +tar -I "zstd" -xf toolchain.tar.zst +rm -f toolchain.tar.zst +mkdir bin +find ./staging_dir/ -name '*' -exec touch {} \; >/dev/null 2>&1 +find ./tmp/ -name '*' -exec touch {} \; >/dev/null 2>&1 +endgroup + # 生成默认配置 group "生成默认配置" make defconfig