Update: support BETA version use apply_repo
This commit is contained in:
71
cattools.sh
71
cattools.sh
@@ -585,28 +585,31 @@ apply_repo() {
|
|||||||
select_repo() {
|
select_repo() {
|
||||||
case "$arch" in
|
case "$arch" in
|
||||||
amd64)
|
amd64)
|
||||||
if [ "$version" == "v23.8" ]; then
|
|
||||||
REPO_URL="$BASE_URL/amd64"
|
if [ "$version" == "v22.12" ]; then
|
||||||
elif [ "$version" == "v22.12" ]; then
|
|
||||||
REPO_URL="$BASE_URL/history/v22.12/amd64"
|
REPO_URL="$BASE_URL/history/v22.12/amd64"
|
||||||
elif [ "$version" == "v23.2" ]; then
|
elif [ "$version" == "v23.2" ]; then
|
||||||
REPO_URL="$BASE_URL/history/v23.2/amd64"
|
REPO_URL="$BASE_URL/history/v23.2/amd64"
|
||||||
|
elif [ "$version" == "v23.8" ]; then
|
||||||
|
REPO_URL="$BASE_URL/amd64"
|
||||||
elif [ "$version" == "v24.3" ]; then
|
elif [ "$version" == "v24.3" ]; then
|
||||||
REPO_URL="$BASE_URL/amd64"
|
REPO_URL="$BASE_URL/repo/pr/v24.3/amd64"
|
||||||
elif [ "$version" == "v24.8" ]; then
|
elif [ "$version" == "v24.8" ]; then
|
||||||
REPO_URL="$BASE_URL/amd64"
|
REPO_URL="$BASE_URL/repo/pr/v24.3/amd64"
|
||||||
else
|
else
|
||||||
echo "Unknown arch $arch /// 未知的架构: $arch"
|
echo "Unknown arch $arch /// 未知的架构: $arch"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
mt798x)
|
mt798x)
|
||||||
if [ "$version" == "v23.8" ]; then
|
if [ "$version" == "v22.12" ]; then
|
||||||
REPO_URL="$BASE_URL/mt798x"
|
|
||||||
elif [ "$version" == "v22.12" ]; then
|
|
||||||
REPO_URL="$BASE_URL/history/v22.12/aarch64_cortex-a53"
|
REPO_URL="$BASE_URL/history/v22.12/aarch64_cortex-a53"
|
||||||
elif [ "$version" == "v23.2" ]; then
|
elif [ "$version" == "v23.2" ]; then
|
||||||
REPO_URL="$BASE_URL/history/v23.2/mt7986a"
|
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
|
else
|
||||||
echo "Unknown arch mt798x /// 未知的 mt798x 版本"
|
echo "Unknown arch mt798x /// 未知的 mt798x 版本"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -615,6 +618,8 @@ apply_repo() {
|
|||||||
rkarm)
|
rkarm)
|
||||||
if [ "$version" == "v22.12" ]; then
|
if [ "$version" == "v22.12" ]; then
|
||||||
REPO_URL="$BASE_URL/rkarm"
|
REPO_URL="$BASE_URL/rkarm"
|
||||||
|
elif [ "$version" == "v24.1" ]; then
|
||||||
|
REPO_URL="$BASE_URL/repo/pr/v24.1/rkarm"
|
||||||
else
|
else
|
||||||
echo "Unknown arch rkarm /// 未知的 rkarm 版本"
|
echo "Unknown arch rkarm /// 未知的 rkarm 版本"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -637,25 +642,41 @@ apply_repo() {
|
|||||||
|
|
||||||
select_repo
|
select_repo
|
||||||
|
|
||||||
echo ""
|
if { [ "$version" == "v24.3" ] && { [ "$arch" == "amd64" ] || [ "$arch" == "mt798x" ]; } } ||
|
||||||
echo "请选择要使用的软件源:"
|
{ [ "$version" == "v24.1" ] && [ "$arch" == "rkarm" ]; }; then
|
||||||
echo "1) repo.miaoer.xyz (主站)"
|
echo "你目前使用的 BETA 版本,只能临时镜像站的软件源,请注意关注 CatWrt 的更新情况!"
|
||||||
echo "2) cfnetlify"
|
echo "请选择要使用的软件源:"
|
||||||
echo "3) netlify"
|
echo "1) netlify"
|
||||||
echo "4) cfvercel"
|
echo "2) vercel (默认)"
|
||||||
echo "5) vercel (默认)"
|
|
||||||
|
|
||||||
read -t 10 -p "Please enter your choice /// 请输入选择 (1-5): " choice
|
read -t 10 -p "Please enter your choice /// 请输入选择 (1-2): " choice
|
||||||
choice=${choice:-5}
|
choice=${choice:-2}
|
||||||
|
|
||||||
case $choice in
|
case $choice in
|
||||||
1) conf_file="distfeeds.conf" ;;
|
1) conf_file="netlify.conf" ;;
|
||||||
2) conf_file="cfnetlify.conf" ;;
|
2) conf_file="vercel.conf" ;;
|
||||||
3) conf_file="netlify.conf" ;;
|
*) conf_file="vercel.conf" ;;
|
||||||
4) conf_file="cfvercel.conf" ;;
|
esac
|
||||||
5) conf_file="vercel.conf" ;;
|
else
|
||||||
*) conf_file="vercel.conf" ;;
|
echo "请选择要使用的软件源:"
|
||||||
esac
|
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"
|
CONF_PATH="$REPO_URL/$conf_file"
|
||||||
if curl --output /dev/null --silent --head --fail "$CONF_PATH"; then
|
if curl --output /dev/null --silent --head --fail "$CONF_PATH"; then
|
||||||
|
|||||||
6
repo/pr/v24.1/rkarm/netlify.conf
Normal file
6
repo/pr/v24.1/rkarm/netlify.conf
Normal file
@@ -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
|
||||||
6
repo/pr/v24.1/rkarm/vercel.conf
Normal file
6
repo/pr/v24.1/rkarm/vercel.conf
Normal file
@@ -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
|
||||||
6
repo/pr/v24.3/amd64/netlify.conf
Normal file
6
repo/pr/v24.3/amd64/netlify.conf
Normal file
@@ -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
|
||||||
6
repo/pr/v24.3/amd64/vercel.conf
Normal file
6
repo/pr/v24.3/amd64/vercel.conf
Normal file
@@ -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
|
||||||
6
repo/pr/v24.3/mt798x/netlify.conf
Normal file
6
repo/pr/v24.3/mt798x/netlify.conf
Normal file
@@ -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
|
||||||
6
repo/pr/v24.3/mt798x/vercel.conf
Normal file
6
repo/pr/v24.3/mt798x/vercel.conf
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user