Skip to content

Commit f1d92b4

Browse files
committed
script: optimize code
Signed-off-by: David Mandy <smallprogramzhusir@gmail.com>
1 parent 25ff656 commit f1d92b4

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

compile_script/main_and_feeds_url.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
# 加载平台配置
44
source $GITHUB_WORKSPACE/compile_script/platforms.sh
5-
# 声明全局数组
6-
declare -a openwrt_REPO_URLS=()
7-
declare -a immortalwrt_REPO_URLS=()
8-
declare -a lede_REPO_URLS=()
9-
declare -a all_REPO_URLS=() # 汇总所有仓库URL,用于updatecheacker.sh
5+
# 声明全局数组,这些变量会被update_checker.sh使用,所以需要声明为全局变量,update_checker.sh会使用_REPO_URLS循环这些变量来获取所有的仓库URL和分支信息,以便进行更新检查
6+
declare -a openwrt_REPO_URLS=() # 存储 openwrt 仓库URL和分支
7+
declare -a immortalwrt_REPO_URLS=() # 存储 immortalwrt 仓库URL和分支
8+
declare -a lede_REPO_URLS=() # 存储 lede 仓库URL和分支
9+
# feeds_REPO_URLS=() # 存储 feeds 仓库URL和分支
1010
declare -a feeds_REPO_URLS=(
1111
"https://github.com/fw876/helloworld"
1212
"https://github.com/Openwrt-Passwall/openwrt-passwall-packages"
@@ -15,7 +15,9 @@ declare -a feeds_REPO_URLS=(
1515
"https://github.com/vernesong/OpenClash"
1616
"https://github.com/nikkinikki-org/OpenWrt-nikki"
1717
)
18+
declare -a all_REPO_URLS=() # 汇总所有仓库URL,用于updatecheacker.sh使用,他由平台仓库URL和feeds仓库URL组成
1819

20+
# 声明 custompackages 仓库URL数组
1921
declare -a custompackages_REPO_URLS=(
2022
https://github.com/jerrykuku/luci-theme-argon
2123
https://github.com/jerrykuku/luci-app-argon-config
@@ -28,7 +30,7 @@ declare -a custompackages_REPO_URLS=(
2830
https://github.com/AngelaCooljx/luci-theme-material3.git
2931
https://github.com/rufengsuixing/luci-app-adguardhome
3032
https://github.com/sbwml/luci-app-mosdns
31-
https://github.com/sirpdboy/luci-app-netspeedtest
33+
# https://github.com/sirpdboy/luci-app-netspeedtest
3234
https://github.com/timsaya/openwrt-bandix
3335
https://github.com/timsaya/luci-app-bandix
3436
https://github.com/destan19/OpenAppFilter

0 commit comments

Comments
 (0)