From 76f848bd0182c13ba458b02c1e7873b2b91a2c14 Mon Sep 17 00:00:00 2001 From: yuanzhen869 Date: Thu, 19 Dec 2024 01:05:31 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/sync=5Fra?= =?UTF-8?q?w=5Ffile.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/sync_raw_file.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/sync_raw_file.yml b/.gitea/workflows/sync_raw_file.yml index 0a60bb2..f1b727d 100644 --- a/.gitea/workflows/sync_raw_file.yml +++ b/.gitea/workflows/sync_raw_file.yml @@ -17,17 +17,15 @@ jobs: run: | # 定义文件目录和平台类型列表 directories=("Lan" "Apple" "Steam" "SteamCN" "Xbox" "OpenAI" "Gemini" "Claude" "China" "Proxy") - platform_types=("Surge" "Clash" "Loon" "QuantumultX" "Shadowrocket") + platform_types=("Surge" "Clash" "Loon" "QuantumultX" "Shadowrocket" "Surge" "Clash" "Loon" "QuantumultX" "Shadowrocket") - # 平台类型和文件扩展名的映射 - declare -A type_mapping - type_mapping=(["Surge"]="list" ["Clash"]="list" ["Loon"]="list" ["QuantumultX"]="list" ["Shadowrocket"]="list") + # 统一将所有文件扩展名设置为 list + filetype="list" # 循环下载文件并根据平台类型和目录动态创建保存路径 for i in ${!directories[@]}; do directory=${directories[$i]} platform_type=${platform_types[$i]} # 使用平台类型变量 - filetype=${type_mapping[$platform_type]} # 获取文件类型 # 构建文件 URL url="https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/${platform_type}/${directory}/${directory}.${filetype}"