From 80d26e3754bc28b9b50cae4f812926c7aa91680b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=B5=E4=BA=8C?= <2860950766@qq.com> Date: Wed, 17 Jul 2024 09:54:44 +0800 Subject: [PATCH] Update: support BETA version use apply_repo --- cattools.sh | 71 ++++++++++++++++++++----------- repo/pr/v24.1/rkarm/netlify.conf | 6 +++ repo/pr/v24.1/rkarm/vercel.conf | 6 +++ repo/pr/v24.3/amd64/netlify.conf | 6 +++ repo/pr/v24.3/amd64/vercel.conf | 6 +++ repo/pr/v24.3/mt798x/netlify.conf | 6 +++ repo/pr/v24.3/mt798x/vercel.conf | 6 +++ 7 files changed, 82 insertions(+), 25 deletions(-) create mode 100644 repo/pr/v24.1/rkarm/netlify.conf create mode 100644 repo/pr/v24.1/rkarm/vercel.conf create mode 100644 repo/pr/v24.3/amd64/netlify.conf create mode 100644 repo/pr/v24.3/amd64/vercel.conf create mode 100644 repo/pr/v24.3/mt798x/netlify.conf create mode 100644 repo/pr/v24.3/mt798x/vercel.conf diff --git a/cattools.sh b/cattools.sh index 8165042..3585c24 100644 --- a/cattools.sh +++ b/cattools.sh @@ -585,28 +585,31 @@ apply_repo() { select_repo() { case "$arch" in amd64) - if [ "$version" == "v23.8" ]; then - REPO_URL="$BASE_URL/amd64" - elif [ "$version" == "v22.12" ]; then + + if [ "$version" == "v22.12" ]; then REPO_URL="$BASE_URL/history/v22.12/amd64" elif [ "$version" == "v23.2" ]; then REPO_URL="$BASE_URL/history/v23.2/amd64" + elif [ "$version" == "v23.8" ]; then + REPO_URL="$BASE_URL/amd64" elif [ "$version" == "v24.3" ]; then - REPO_URL="$BASE_URL/amd64" + REPO_URL="$BASE_URL/repo/pr/v24.3/amd64" elif [ "$version" == "v24.8" ]; then - REPO_URL="$BASE_URL/amd64" + REPO_URL="$BASE_URL/repo/pr/v24.3/amd64" else echo "Unknown arch $arch /// 未知的架构: $arch" exit 1 fi ;; mt798x) - if [ "$version" == "v23.8" ]; then - REPO_URL="$BASE_URL/mt798x" - elif [ "$version" == "v22.12" ]; then + if [ "$version" == "v22.12" ]; then REPO_URL="$BASE_URL/history/v22.12/aarch64_cortex-a53" elif [ "$version" == "v23.2" ]; then REPO_URL="$BASE_URL/history/v23.2/mt7986a" + elif [ "$version" == "v23.8" ]; then + REPO_URL="$BASE_URL/mt798x" + elif [ "$version" == "v24.3" ]; then + REPO_URL="$BASE_URL/repo/pr/v24.3/mt798x" else echo "Unknown arch mt798x /// 未知的 mt798x 版本" exit 1 @@ -615,6 +618,8 @@ apply_repo() { rkarm) if [ "$version" == "v22.12" ]; then REPO_URL="$BASE_URL/rkarm" + elif [ "$version" == "v24.1" ]; then + REPO_URL="$BASE_URL/repo/pr/v24.1/rkarm" else echo "Unknown arch rkarm /// 未知的 rkarm 版本" exit 1 @@ -637,25 +642,41 @@ apply_repo() { select_repo - echo "" - echo "请选择要使用的软件源:" - echo "1) repo.miaoer.xyz (主站)" - echo "2) cfnetlify" - echo "3) netlify" - echo "4) cfvercel" - echo "5) vercel (默认)" + if { [ "$version" == "v24.3" ] && { [ "$arch" == "amd64" ] || [ "$arch" == "mt798x" ]; } } || + { [ "$version" == "v24.1" ] && [ "$arch" == "rkarm" ]; }; then + echo "你目前使用的 BETA 版本,只能临时镜像站的软件源,请注意关注 CatWrt 的更新情况!" + echo "请选择要使用的软件源:" + echo "1) netlify" + echo "2) vercel (默认)" - read -t 10 -p "Please enter your choice /// 请输入选择 (1-5): " choice - choice=${choice:-5} + read -t 10 -p "Please enter your choice /// 请输入选择 (1-2): " choice + choice=${choice:-2} - case $choice in - 1) conf_file="distfeeds.conf" ;; - 2) conf_file="cfnetlify.conf" ;; - 3) conf_file="netlify.conf" ;; - 4) conf_file="cfvercel.conf" ;; - 5) conf_file="vercel.conf" ;; - *) conf_file="vercel.conf" ;; - esac + case $choice in + 1) conf_file="netlify.conf" ;; + 2) conf_file="vercel.conf" ;; + *) conf_file="vercel.conf" ;; + esac + else + echo "请选择要使用的软件源:" + echo "1) repo.miaoer.xyz (主站)" + echo "2) cfnetlify" + echo "3) netlify" + echo "4) cfvercel" + echo "5) vercel (默认)" + + read -t 10 -p "Please enter your choice /// 请输入选择 (1-5): " choice + choice=${choice:-5} + + case $choice in + 1) conf_file="distfeeds.conf" ;; + 2) conf_file="cfnetlify.conf" ;; + 3) conf_file="netlify.conf" ;; + 4) conf_file="cfvercel.conf" ;; + 5) conf_file="vercel.conf" ;; + *) conf_file="vercel.conf" ;; + esac + fi CONF_PATH="$REPO_URL/$conf_file" if curl --output /dev/null --silent --head --fail "$CONF_PATH"; then diff --git a/repo/pr/v24.1/rkarm/netlify.conf b/repo/pr/v24.1/rkarm/netlify.conf new file mode 100644 index 0000000..dea0d1e --- /dev/null +++ b/repo/pr/v24.1/rkarm/netlify.conf @@ -0,0 +1,6 @@ +src/gz openwrt_core https://deploy-preview-33--catwrt.netlify.app/targets/rockchip/armv8/packages +src/gz openwrt_base https://deploy-preview-33--catwrt.netlify.app/aarch64_generic/base +src/gz openwrt_luci https://deploy-preview-33--catwrt.netlify.app/aarch64_generic/luci +src/gz openwrt_packages https://deploy-preview-33--catwrt.netlify.app/aarch64_generic/packages +src/gz openwrt_routing https://deploy-preview-33--catwrt.netlify.app/aarch64_generic/routing +src/gz openwrt_telephony https://deploy-preview-33--catwrt.netlify.app/aarch64_generic/telephony diff --git a/repo/pr/v24.1/rkarm/vercel.conf b/repo/pr/v24.1/rkarm/vercel.conf new file mode 100644 index 0000000..f4e7af8 --- /dev/null +++ b/repo/pr/v24.1/rkarm/vercel.conf @@ -0,0 +1,6 @@ +src/gz openwrt_core https://catwrt-git-v241rock64-miaoermua.vercel.app/targets/rockchip/armv8/packages +src/gz openwrt_base https://catwrt-git-v241rock64-miaoermua.vercel.app/aarch64_generic/base +src/gz openwrt_luci https://catwrt-git-v241rock64-miaoermua.vercel.app/aarch64_generic/luci +src/gz openwrt_packages https://catwrt-git-v241rock64-miaoermua.vercel.app/aarch64_generic/packages +src/gz openwrt_routing https://catwrt-git-v241rock64-miaoermua.vercel.app/aarch64_generic/routing +src/gz openwrt_telephony https://catwrt-git-v241rock64-miaoermua.vercel.app/aarch64_generic/telephony diff --git a/repo/pr/v24.3/amd64/netlify.conf b/repo/pr/v24.3/amd64/netlify.conf new file mode 100644 index 0000000..a8dbd9e --- /dev/null +++ b/repo/pr/v24.3/amd64/netlify.conf @@ -0,0 +1,6 @@ +src/gz openwrt_core https://deploy-preview-35--catwrt.netlify.app/targets/x86/64/packages +src/gz openwrt_base https://deploy-preview-35--catwrt.netlify.app/x86_64/base +src/gz openwrt_luci https://deploy-preview-35--catwrt.netlify.app/x86_64/luci +src/gz openwrt_packages https://deploy-preview-35--catwrt.netlify.app/x86_64/packages +src/gz openwrt_routing https://deploy-preview-35--catwrt.netlify.app/x86_64/routing +src/gz openwrt_telephony https://deploy-preview-35--catwrt.netlify.app/x86_64/telephony diff --git a/repo/pr/v24.3/amd64/vercel.conf b/repo/pr/v24.3/amd64/vercel.conf new file mode 100644 index 0000000..90228cd --- /dev/null +++ b/repo/pr/v24.3/amd64/vercel.conf @@ -0,0 +1,6 @@ +src/gz openwrt_core https://catwrt-git-catwrtv243x8664-miaoermua.vercel.app/targets/x86/64/packages +src/gz openwrt_base https://catwrt-git-catwrtv243x8664-miaoermua.vercel.app/x86_64/base +src/gz openwrt_luci https://catwrt-git-catwrtv243x8664-miaoermua.vercel.app/x86_64/luci +src/gz openwrt_packages https://catwrt-git-catwrtv243x8664-miaoermua.vercel.app/x86_64/packages +src/gz openwrt_routing https://catwrt-git-catwrtv243x8664-miaoermua.vercel.app/x86_64/routing +src/gz openwrt_telephony https://catwrt-git-catwrtv243x8664-miaoermua.vercel.app/x86_64/telephony diff --git a/repo/pr/v24.3/mt798x/netlify.conf b/repo/pr/v24.3/mt798x/netlify.conf new file mode 100644 index 0000000..0499972 --- /dev/null +++ b/repo/pr/v24.3/mt798x/netlify.conf @@ -0,0 +1,6 @@ +src/gz openwrt_core https://deploy-preview-31--catwrt.netlify.app/targets/mt798x/filogic/packages +src/gz openwrt_base https://deploy-preview-31--catwrt.netlify.app/mt798x/base +src/gz openwrt_luci https://deploy-preview-31--catwrt.netlify.app/mt798x/luci +src/gz openwrt_packages https://deploy-preview-31--catwrt.netlify.app/mt798x/packages +src/gz openwrt_routing https://deploy-preview-31--catwrt.netlify.app/mt798x/routing +src/gz openwrt_telephony https://deploy-preview-31--catwrt.netlify.app/mt798x/telephony diff --git a/repo/pr/v24.3/mt798x/vercel.conf b/repo/pr/v24.3/mt798x/vercel.conf new file mode 100644 index 0000000..6f05edc --- /dev/null +++ b/repo/pr/v24.3/mt798x/vercel.conf @@ -0,0 +1,6 @@ +src/gz openwrt_core https://catwrt-git-v2312-mt798x-miaoermua.vercel.app//targets/mt798x/filogic/packages +src/gz openwrt_base https://catwrt-git-v2312-mt798x-miaoermua.vercel.app//mt798x/base +src/gz openwrt_luci https://catwrt-git-v2312-mt798x-miaoermua.vercel.app//mt798x/luci +src/gz openwrt_packages https://catwrt-git-v2312-mt798x-miaoermua.vercel.app//mt798x/packages +src/gz openwrt_routing https://catwrt-git-v2312-mt798x-miaoermua.vercel.app//mt798x/routing +src/gz openwrt_telephony https://catwrt-git-v2312-mt798x-miaoermua.vercel.app//mt798x/telephony