From 526a7feb89a6e0549a027ec6d5be4d9be754ed6d Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Fri, 22 Nov 2024 11:43:18 +0800 Subject: [PATCH] Format code --- src/framework/mirror.c | 80 +++++++++++++++++++---------- src/framework/struct.h | 10 ++-- src/recipe/lang/Clojure.c | 10 ++-- src/recipe/lang/Dart/Flutter.c | 12 ++--- src/recipe/lang/Dart/Pub.c | 12 ++--- src/recipe/lang/Go.c | 21 ++++---- src/recipe/lang/Haskell.c | 16 +++--- src/recipe/lang/Java.c | 12 ++--- src/recipe/lang/Julia.c | 14 ++--- src/recipe/lang/Lua.c | 14 ++--- src/recipe/lang/NuGet.c | 15 +++--- src/recipe/lang/OCaml.c | 8 +-- src/recipe/lang/PHP.c | 12 ++--- src/recipe/lang/Perl.c | 18 +++---- src/recipe/lang/Python/common.h | 4 +- src/recipe/lang/R.c | 10 ++-- src/recipe/lang/Rust/Cargo.c | 4 +- src/recipe/lang/Rust/common.h | 4 +- src/recipe/lang/Rust/rustup.c | 18 +++---- src/recipe/menu.c | 4 +- src/recipe/os/APT/Armbian.c | 21 ++++---- src/recipe/os/APT/Debian.c | 24 ++++----- src/recipe/os/APT/Kali-Linux.c | 26 +++++----- src/recipe/os/APT/Linux-Lite.c | 12 ++--- src/recipe/os/APT/Linux-Mint.c | 32 ++++++------ src/recipe/os/APT/ROS.c | 24 ++++----- src/recipe/os/APT/Raspberry-Pi-OS.c | 18 +++---- src/recipe/os/APT/Trisquel.c | 18 +++---- src/recipe/os/APT/deepin.c | 20 ++++---- src/recipe/os/APT/openKylin.c | 10 ++-- src/recipe/os/Alpine-Linux.c | 24 ++++----- src/recipe/os/BSD/FreeBSD.c | 20 ++++---- src/recipe/os/BSD/NetBSD.c | 22 ++++---- src/recipe/os/BSD/OpenBSD.c | 22 ++++---- src/recipe/os/Gentoo-Linux.c | 20 ++++---- src/recipe/os/OpenWrt.c | 24 ++++----- src/recipe/os/Solus.c | 16 +++--- src/recipe/os/Void-Linux.c | 28 +++++----- src/recipe/os/YUM/AlmaLinux.c | 16 +++--- src/recipe/os/YUM/Anolis-OS.c | 12 ++--- src/recipe/os/YUM/Fedora-Linux.c | 20 ++++---- src/recipe/os/YUM/Rocky-Linux.c | 26 +++++----- src/recipe/os/YUM/common.h | 6 +-- src/recipe/os/YUM/openEuler.c | 22 ++++---- src/recipe/os/openSUSE.c | 24 ++++----- src/recipe/os/pacman/Arch-Linux.c | 39 +++++++------- src/recipe/os/pacman/MSYS2.c | 22 ++++---- src/recipe/ware/Anaconda.c | 14 ++--- src/recipe/ware/CocoaPods.c | 15 +++--- src/recipe/ware/Docker-Hub.c | 24 +++++---- src/recipe/ware/Emacs.c | 22 ++++---- src/recipe/ware/Flathub.c | 10 ++-- src/recipe/ware/Guix.c | 10 ++-- src/recipe/ware/Homebrew.c | 13 ++--- src/recipe/ware/Nix.c | 8 +-- src/recipe/ware/TeX-Live.c | 18 +++---- src/recipe/ware/WinGet.c | 14 +++-- 57 files changed, 525 insertions(+), 489 deletions(-) diff --git a/src/framework/mirror.c b/src/framework/mirror.c index dc977f5..4ebd7b8 100644 --- a/src/framework/mirror.c +++ b/src/framework/mirror.c @@ -24,79 +24,93 @@ * * Wiki中的排序是根据 https://github.com/mirrorz-org/oh-my-mirrorz 挑选速度前10位 */ -MirrorSite_t -MirrorZ = { +MirrorSite_t MirrorZ = +{ "mirrorz", "MirrorZ", "MirrorZ 校园网镜像站", "https://mirrors.cernet.edu.cn/", {SKIP, "功能特殊无法测速,跳过", "SKIP because of its special function"} }, -Tuna = { +Tuna = +{ "tuna", "TUNA", "清华大学开源软件镜像站", "https://mirrors.tuna.tsinghua.edu.cn/", {NotSkip, NA, NA, "https://mirrors.tuna.tsinghua.edu.cn/speedtest/1000mb.bin"} }, -Sjtug_Zhiyuan = { +Sjtug_Zhiyuan = +{ "sjtu", "SJTUG-zhiyuan", "上海交通大学致远镜像站", "https://mirrors.sjtug.sjtu.edu.cn/", {NotSkip, NA, NA, "https://mirrors.sjtug.sjtu.edu.cn/ctan" Big_File_ctan} }, -Zju = { +Zju = +{ "zju", "ZJU", "浙江大学开源软件镜像站", "https://mirrors.zju.edu.cn/", {NotSkip, NA, NA, "https://mirrors.zju.edu.cn/ubuntu-releases" Big_File_ubuntu} }, -Lzuoss = { +Lzuoss = +{ "lzu", "LZUOSS", "兰州大学开源社区镜像站", "https://mirror.lzu.edu.cn/", {NotSkip, NA, NA, "https://mirror.lzu.edu.cn/CTAN" Big_File_ctan} }, -Jlu = { +Jlu = +{ "jlu", "JLU", "吉林大学开源镜像站", "https://mirrors.jlu.edu.cn/", {NotSkip, NA, NA, "https://mirrors.jlu.edu.cn/_static/speedtest.bin"} }, -Bfsu = { +Bfsu = +{ "bfsu", "BFSU", "北京外国语大学开源软件镜像站", "https://mirrors.bfsu.edu.cn/", {NotSkip, NA, NA, "https://mirrors.bfsu.edu.cn/speedtest/1000mb.bin"} }, -Pku = { +Pku = +{ "pku", "PKU", "北京大学开源镜像站", "https://mirrors.pku.edu.cn/", {NotSkip, NA, NA, "https://mirrors.pku.edu.cn/ubuntu-releases" Big_File_ubuntu} }, -Bjtu = { +Bjtu = +{ "bjtu", "BJTU", "北京交通大学自由与开源软件镜像站", "https://mirror.bjtu.edu.cn/", {NotSkip, NA, NA, "https://mirror.bjtu.edu.cn/archlinux" Big_File_archlinux} }, -Sustech = { +Sustech = +{ "sustech", "SUSTech", "南方科技大学开源软件镜像站", "https://mirrors.sustech.edu.cn/", {NotSkip, NA, NA, "https://mirrors.sustech.edu.cn/site/speedtest/1000mb.bin"} }, -Ustc = { +Ustc = +{ "ustc", "USTC", "中国科学技术大学开源镜像站", "https://mirrors.ustc.edu.cn/", {NotSkip, NA, NA, "https://mirrors.ustc.edu.cn/ubuntu-releases" Big_File_ubuntu} }, -Hust = { +Hust = +{ "hust", "HUST", "华中科技大学开源镜像站", "https://mirrors.hust.edu.cn/", {NotSkip, NA, NA, "https://mirrors.hust.edu.cn/ubuntu-releases" Big_File_ubuntu} }, // 速度暂时处于10位以后,但是目前可用的源 -Iscas = { +Iscas = +{ "iscas", "ISCAS", "中科院软件所智能软件研究中心开源镜像站", "https://mirror.iscas.ac.cn/", {NotSkip, NA, NA, "https://mirror.iscas.ac.cn/ubuntu-releases" Big_File_ubuntu} }, -Scau = { +Scau = +{ "scau", "SCAU", "华南农业大学开源软件镜像站", "https://mirrors.scau.edu.cn/", {NotSkip, NA, NA, "https://mirrors.scau.edu.cn/ubuntu-releases" Big_File_ubuntu} }, -Nju = { +Nju = +{ "nju", "NJU", "南京大学开源镜像站", "https://mirrors.nju.edu.cn/", {NotSkip, NA, NA, "https://mirrors.nju.edu.cn/archlinux" Big_File_archlinux} }; @@ -104,7 +118,8 @@ Nju = { /** * @note 2023-09-05 只使用了不到5次,重庆大学镜像站就把我的ip封杀了,对用户来说封杀策略过严,暂时不可靠,暂时不用 * - * Cqu = { + * Cqu = + * { * "cqu", "CQU", "重庆大学开源软件镜像站", "https://mirrors.cqu.edu.cn/", * {NotSkip, NA, NA, "https://mirrors.cqu.edu.cn/speedtest/1000mb.bin"} * }; @@ -116,58 +131,67 @@ Nju = { /** * 商业公司提供的源 */ -MirrorSite_t -Ali = { +MirrorSite_t Ali = +{ "ali", "Ali OPSX Public", "阿里巴巴开源镜像站(公网)", "https://developer.aliyun.com/mirror/", {NotSkip, NA, NA, "https://mirrors.aliyun.com/deepin-cd" Big_File_deepin} }, /* // https://mirrors.cloud.aliyuncs.com/ -Ali_ECS_VPC = { +Ali_ECS_VPC = +{ "ali-ECS-VPC", "Ali OPSX ECS VPC", "阿里巴巴开源镜像站(ECS VPC网络)", "https://developer.aliyun.com/mirror/", {NotSkip, NA, NA, "https://mirrors.cloud.aliyuncs.com/deepin-cd" Big_File_deepin} }, // https://mirrors.aliyuncs.com/ -Ali_ECS_classic = { +Ali_ECS_classic = +{ "ali-ECS", "Ali OPSX ECS", "阿里巴巴开源镜像站(ECS 经典网络)", "https://developer.aliyun.com/mirror/", {NotSkip, NA, NA, "https://mirrors.aliyuncs.com/deepin-cd" Big_File_deepin} }, */ -Tencent = { +Tencent = +{ "tencent", "Tencent Public", "腾讯软件源(公网)", "https://mirrors.tencent.com/", {NotSkip, NA, NA, "https://mirrors.cloud.tencent.com/ubuntu-releases" Big_File_ubuntu} }, /* -Tencent_Intra = { +Tencent_Intra = +{ "tencent-intra", "Tencent Intranet", "腾讯软件源(内网)", "https://mirrors.tencent.com/", {NotSkip, NA, NA, "https://mirrors.cloud.tencentyun.com/ubuntu-releases" Big_File_ubuntu} }, */ -Huawei = { +Huawei = +{ "huawei", "Huawei Cloud", "华为开源镜像站", "https://mirrors.huaweicloud.com/", {NotSkip, NA, NA, "https://mirrors.huaweicloud.com/ubuntu-releases" Big_File_ubuntu} }, -Volcengine = { +Volcengine = +{ "volc", "Volcengine", "火山引擎开源软件镜像站(公网)", "https://developer.volcengine.com/mirror/", {NotSkip, NA, NA, "https://mirrors.volces.com/ubuntu-releases" Big_File_ubuntu} }, /* -Volceengine_Intra = { +Volceengine_Intra = +{ "volc-intra", "Volcengine Intranet", "火山引擎开源软件镜像站(内网)", "https://developer.volcengine.com/mirror/", "https://mirrors.ivolces.com/ubuntu-releases" Big_File_ubuntu }, */ -Netease = { +Netease = +{ "netease", "Netease", "网易开源镜像站", "https://mirrors.163.com/", {NotSkip, NA, NA, "https://mirrors.163.com/deepin-cd" Big_File_deepin} }, -Sohu = { +Sohu = +{ "sohu", "SOHU", "搜狐开源镜像站", "https://mirrors.sohu.com/", {NotSkip, NA, NA, "https://mirrors.sohu.com/deepin-cd" Big_File_deepin} }; diff --git a/src/framework/struct.h b/src/framework/struct.h index c70b8e5..d37dd0a 100644 --- a/src/framework/struct.h +++ b/src/framework/struct.h @@ -38,14 +38,14 @@ SourceProvider_t; typedef SourceProvider_t MirrorSite_t; -SourceProvider_t -UpstreamProvider = { +SourceProvider_t UpstreamProvider = +{ "upstream", "Upstream", "上游默认源", NULL, {SKIP, "上游默认源不测速", "SKIP for upstream source", NULL} -}; +}, -SourceProvider_t -UserDefinedProvider = { +UserDefinedProvider = +{ "user", "用户自定义", "用户自定义", NULL, {SKIP, "用户自定义源不测速", "SKIP for user-defined source", NULL} }; diff --git a/src/recipe/lang/Clojure.c b/src/recipe/lang/Clojure.c index 7de509d..c51e89d 100644 --- a/src/recipe/lang/Clojure.c +++ b/src/recipe/lang/Clojure.c @@ -11,11 +11,11 @@ * @time 2023-09-10 更新 * @note 不太好换,且用户可能不多,我们暂时只给用户提供文档 */ -static Source_t -pl_clojure_sources[] = { - {&UpstreamProvider, NULL}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/help/clojars/"}, - {&Ustc, "https://mirrors.ustc.edu.cn/help/clojars.html"} +static Source_t pl_clojure_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/help/clojars/"}, + {&Ustc, "https://mirrors.ustc.edu.cn/help/clojars.html"} }; def_sources_n(pl_clojure); diff --git a/src/recipe/lang/Dart/Flutter.c b/src/recipe/lang/Dart/Flutter.c index 7c7827e..5ce96c8 100644 --- a/src/recipe/lang/Dart/Flutter.c +++ b/src/recipe/lang/Dart/Flutter.c @@ -15,12 +15,12 @@ /** * @update 2024-10-31 */ -static Source_t -pl_dart_flutter_sources[] = { - {&UpstreamProvider, "https://storage.googleapis.com"}, - {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn"}, // 没有后缀,怀疑是否存在问题 - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/git/flutter"}, // URL 带 git - {&Nju, "https://mirror.nju.edu.cn/flutter"} +static Source_t pl_dart_flutter_sources[] = +{ + {&UpstreamProvider, "https://storage.googleapis.com"}, + {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn"}, // 没有后缀,怀疑是否存在问题 + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/git/flutter"}, // URL 带 git + {&Nju, "https://mirror.nju.edu.cn/flutter"} }; def_sources_n(pl_dart_flutter); diff --git a/src/recipe/lang/Dart/Pub.c b/src/recipe/lang/Dart/Pub.c index 0cbc59c..2c6c92c 100644 --- a/src/recipe/lang/Dart/Pub.c +++ b/src/recipe/lang/Dart/Pub.c @@ -14,12 +14,12 @@ /** * @update 2024-10-31 */ -static Source_t -pl_dart_sources[] = { - {&UpstreamProvider, "https://pub.dev"}, - {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/dart-pub"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"}, - {&Nju, "https://mirror.nju.edu.cn/dart-pub"} +static Source_t pl_dart_sources[] = +{ + {&UpstreamProvider, "https://pub.dev"}, + {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/dart-pub"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"}, + {&Nju, "https://mirror.nju.edu.cn/dart-pub"} }; def_sources_n(pl_dart); diff --git a/src/recipe/lang/Go.c b/src/recipe/lang/Go.c index 3f26313..355e3d8 100644 --- a/src/recipe/lang/Go.c +++ b/src/recipe/lang/Go.c @@ -9,13 +9,14 @@ * Last Modified : <2024-10-31> * ------------------------------------------------------------*/ -static MirrorSite_t -GoProxyCN = { +static MirrorSite_t GoProxyCN = +{ "goproxy.cn", "Goproxy.cn", "Goproxy.cn (七牛云)", "https://goproxy.cn/", {NotSkip, NA, NA, "https://goproxy.cn/github.com/aws/aws-sdk-go/@v/v1.45.2.zip"} // 30 MB }, -GoProxyIO = { +GoProxyIO = +{ "goproxy.io", "GOPROXY.IO", "GOPROXY.IO", "https://goproxy.io/", {NotSkip, NA, NA, "https://goproxy.io/github.com/aws/aws-sdk-go/@v/v1.45.2.zip"} // 30 MB }; @@ -25,13 +26,13 @@ GoProxyIO = { * @update 2024-10-31 * @note 缺少教育网软件源 */ -static Source_t -pl_go_sources[] = { - {&UpstreamProvider, "https://proxy.golang.org"}, - {&GoProxyCN, "https://goproxy.cn"}, - {&Ali, "https://mirrors.aliyun.com/goproxy/"}, - {&Huawei, "https://mirrors.huaweicloud.com/goproxy/"}, - {&GoProxyIO, "https://goproxy.io"} +static Source_t pl_go_sources[] = +{ + {&UpstreamProvider, "https://proxy.golang.org"}, + {&GoProxyCN, "https://goproxy.cn"}, + {&Ali, "https://mirrors.aliyun.com/goproxy/"}, + {&Huawei, "https://mirrors.huaweicloud.com/goproxy/"}, + {&GoProxyIO, "https://goproxy.io"} }; def_sources_n(pl_go); diff --git a/src/recipe/lang/Haskell.c b/src/recipe/lang/Haskell.c index 4052f53..ac173ab 100644 --- a/src/recipe/lang/Haskell.c +++ b/src/recipe/lang/Haskell.c @@ -8,15 +8,15 @@ * ------------------------------------------------------------*/ /** - * @time 2023-09-10 更新 + * @update 2023-09-10 */ -static Source_t -pl_haskell_sources[] = { - {&UpstreamProvider, NULL}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/hackage"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/hackage"}, - {&Nju, "https://mirror.nju.edu.cn/hackage"}, - {&Ustc, "https://mirrors.ustc.edu.cn/hackage"} +static Source_t pl_haskell_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/hackage"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/hackage"}, + {&Nju, "https://mirror.nju.edu.cn/hackage"}, + {&Ustc, "https://mirrors.ustc.edu.cn/hackage"} }; def_sources_n(pl_haskell); diff --git a/src/recipe/lang/Java.c b/src/recipe/lang/Java.c index 63a3f2c..3b93b89 100644 --- a/src/recipe/lang/Java.c +++ b/src/recipe/lang/Java.c @@ -11,12 +11,12 @@ * @time 2024-04-18 更新 * @note 缺少教育网或开源社区软件源 */ -static Source_t -pl_java_sources[] = { - {&UpstreamProvider, NULL}, - {&Ali, "https://maven.aliyun.com/repository/public/"}, - {&Huawei, "https://mirrors.huaweicloud.com/repository/maven/"}, - {&Netease, "http://mirrors.163.com/maven/repository/maven-public/"} // 网易的24小时更新一次 +static Source_t pl_java_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Ali, "https://maven.aliyun.com/repository/public/"}, + {&Huawei, "https://mirrors.huaweicloud.com/repository/maven/"}, + {&Netease, "http://mirrors.163.com/maven/repository/maven-public/"} // 网易的24小时更新一次 }; def_sources_n(pl_java); diff --git a/src/recipe/lang/Julia.c b/src/recipe/lang/Julia.c index 954e9af..d5e5d65 100644 --- a/src/recipe/lang/Julia.c +++ b/src/recipe/lang/Julia.c @@ -8,15 +8,15 @@ * ------------------------------------------------------------*/ /** - * @time 2023-09-05 更新 + * @update 2023-09-05 * @note 缺少商业公司或开源社区软件源 */ -static Source_t -pl_julia_sources[] = { - {&UpstreamProvider, NULL}, - {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/julia"}, - {&Pku, "https://mirrors.pku.edu.cn/julia"}, - {&Nju, "https://mirror.nju.edu.cn/julia"} +static Source_t pl_julia_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/julia"}, + {&Pku, "https://mirrors.pku.edu.cn/julia"}, + {&Nju, "https://mirror.nju.edu.cn/julia"} }; def_sources_n(pl_julia); diff --git a/src/recipe/lang/Lua.c b/src/recipe/lang/Lua.c index 580436c..2b0bff9 100644 --- a/src/recipe/lang/Lua.c +++ b/src/recipe/lang/Lua.c @@ -7,21 +7,21 @@ * Last Modified : <2024-08-09> * ------------------------------------------------------------*/ -static MirrorSite_t -Api7 = { +static MirrorSite_t Api7 = +{ "api7", "api7.ai", "深圳支流科技有限公司", "https://www.apiseven.com/", {SKIP, ToFill, ToFill, NULL} }; /** - * @time 2023-09-27 更新 + * @update 2023-09-27 * @note 目前只有一个源 */ -static Source_t -pl_lua_sources[] = { - {&UpstreamProvider, NULL}, - {&Api7, "https://luarocks.cn"}, +static Source_t pl_lua_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Api7, "https://luarocks.cn"}, }; def_sources_n(pl_lua); diff --git a/src/recipe/lang/NuGet.c b/src/recipe/lang/NuGet.c index fe6a617..bc31c49 100644 --- a/src/recipe/lang/NuGet.c +++ b/src/recipe/lang/NuGet.c @@ -7,8 +7,9 @@ * Last Modified : <2024-08-09> * ------------------------------------------------------------*/ -static MirrorSite_t -NugetOrg = {"nuget.org", "NuGet Org", "Nuget Organization", "https://www.nuget.org/", +static MirrorSite_t NugetOrg = +{ + "nuget.org", "NuGet Org", "Nuget Organization", "https://www.nuget.org/", {SKIP, ToFill, ToFill, NULL} }; @@ -19,11 +20,11 @@ NugetOrg = {"nuget.org", "NuGet Org", "Nuget Organization", "https://www.nuget.o * https://mirrors.huaweicloud.com/mirrorDetail/5ebf85de07b41baf6d0882ab?mirrorName=nuget&catalog=language * } */ -static Source_t -pl_nuget_sources[] = { - {&UpstreamProvider, NULL}, - {&NugetOrg, "https://www.nuget.org/api/v2/"}, - {&Huawei, "https://mirrors.huaweicloud.com/repository/nuget/v3"} +static Source_t pl_nuget_sources[] = +{ + {&UpstreamProvider, NULL}, + {&NugetOrg, "https://www.nuget.org/api/v2/"}, + {&Huawei, "https://mirrors.huaweicloud.com/repository/nuget/v3"} }; def_sources_n(pl_nuget); diff --git a/src/recipe/lang/OCaml.c b/src/recipe/lang/OCaml.c index 8224485..9f9896a 100644 --- a/src/recipe/lang/OCaml.c +++ b/src/recipe/lang/OCaml.c @@ -10,10 +10,10 @@ /** * @update 2023-09-15 */ -static Source_t -pl_ocaml_sources[] = { - {&UpstreamProvider, NULL}, - {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/git/opam-repository.git"} +static Source_t pl_ocaml_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/git/opam-repository.git"} }; def_sources_n(pl_ocaml); diff --git a/src/recipe/lang/PHP.c b/src/recipe/lang/PHP.c index d63ccf5..f9b1f5b 100644 --- a/src/recipe/lang/PHP.c +++ b/src/recipe/lang/PHP.c @@ -11,13 +11,13 @@ * @update 2024-09-14 * @note 缺少教育网或开源社区软件源 */ -static Source_t -pl_php_sources[] = { - {&UpstreamProvider, NULL}, - {&Ali, "https://mirrors.aliyun.com/composer/"}, - {&Tencent, "https://mirrors.tencent.com/composer/"}, +static Source_t pl_php_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Ali, "https://mirrors.aliyun.com/composer/"}, + {&Tencent, "https://mirrors.tencent.com/composer/"}, // {&Tencent_Intra, "https://mirrors.tencentyun.com/composer/"}, - {&Huawei, "https://mirrors.huaweicloud.com/repository/php/"} + {&Huawei, "https://mirrors.huaweicloud.com/repository/php/"} }; def_sources_n(pl_php); diff --git a/src/recipe/lang/Perl.c b/src/recipe/lang/Perl.c index d4331b5..33bc072 100644 --- a/src/recipe/lang/Perl.c +++ b/src/recipe/lang/Perl.c @@ -10,15 +10,15 @@ /** * @update 2024-05-24 */ -static Source_t -pl_perl_sources[] = { - {&UpstreamProvider, NULL}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/CPAN/"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CPAN/"}, - {&Bjtu, "https://mirror.bjtu.edu.cn/cpan/"}, - {&Hust, "https://mirrors.hust.edu.cn/CPAN/"}, - {&Ali, "https://mirrors.aliyun.com/CPAN/"}, - {&Lzuoss, "https://mirror.lzu.edu.cn/CPAN/"} +static Source_t pl_perl_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/CPAN/"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CPAN/"}, + {&Bjtu, "https://mirror.bjtu.edu.cn/cpan/"}, + {&Hust, "https://mirrors.hust.edu.cn/CPAN/"}, + {&Ali, "https://mirrors.aliyun.com/CPAN/"}, + {&Lzuoss, "https://mirror.lzu.edu.cn/CPAN/"} }; def_sources_n(pl_perl); diff --git a/src/recipe/lang/Python/common.h b/src/recipe/lang/Python/common.h index ceeb794..06f6df5 100644 --- a/src/recipe/lang/Python/common.h +++ b/src/recipe/lang/Python/common.h @@ -18,8 +18,8 @@ static SourceProvider_t UpstreamPython = * @update 2024-09-14 * @note 不要添加Zju,浙大的pypi在校外访问会自动转向Tuna */ -static Source_t -pl_python_sources[] = { +static Source_t pl_python_sources[] = +{ {&UpstreamPython, "https://pypi.org/simple"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/pypi/web/simple"}, {&Lzuoss, "https://mirror.lzu.edu.cn/pypi/web/simple"}, diff --git a/src/recipe/lang/R.c b/src/recipe/lang/R.c index a92e763..aef3545 100644 --- a/src/recipe/lang/R.c +++ b/src/recipe/lang/R.c @@ -14,12 +14,12 @@ * 我们在换cran的同时,也直接帮助用户换bioconductor * } */ -static Source_t -pl_r_sources[] = { - {&UpstreamProvider, NULL}, - {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/cran/"}, +static Source_t pl_r_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/cran/"}, // {&Ali, "https://mirrors.aliyun.com/CRAN/"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CRAN/"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CRAN/"}, // {&Sustech, "https://mirrors.sustech.edu.cn/CRAN"}, // {&Bfsu, "https://mirrors.bfsu.edu.cn/CRAN/"}, // {&Bjtu, "https://mirror.bjtu.edu.cn/cran/"}, diff --git a/src/recipe/lang/Rust/Cargo.c b/src/recipe/lang/Rust/Cargo.c index caaa46a..8e45147 100644 --- a/src/recipe/lang/Rust/Cargo.c +++ b/src/recipe/lang/Rust/Cargo.c @@ -12,8 +12,8 @@ * @note 以下都支持稀疏索引,我们换源时都将默认添加 `sparse+` * @note 链接末尾的 `/` 不能缺少 */ -static Source_t -pl_rust_cargo_sources[] = { +static Source_t pl_rust_cargo_sources[] = +{ {&UpstreamProvider, "https://index.crates.io/"}, // @help 是这个吗? {&MirrorZ, "https://mirrors.cernet.edu.cn/crates.io-index/"}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/crates.io-index/"}, diff --git a/src/recipe/lang/Rust/common.h b/src/recipe/lang/Rust/common.h index ead5c42..4aef9b6 100644 --- a/src/recipe/lang/Rust/common.h +++ b/src/recipe/lang/Rust/common.h @@ -7,8 +7,8 @@ * Last Modified : <2024-11-21> * ------------------------------------------------------------*/ -static MirrorSite_t -RsProxyCN = { +static MirrorSite_t RsProxyCN = +{ "rsproxycn", "RsProxy.cn", "字节跳动基础架构Dev Infra", "https://rsproxy.cn/", {SKIP, ToFill, ToFill, NULL} }; diff --git a/src/recipe/lang/Rust/rustup.c b/src/recipe/lang/Rust/rustup.c index 7e6991e..e935a52 100644 --- a/src/recipe/lang/Rust/rustup.c +++ b/src/recipe/lang/Rust/rustup.c @@ -11,15 +11,15 @@ /** * @update 2024-10-02 */ -static Source_t -pl_rust_rustup_sources[] = { - {&UpstreamProvider, "https://static.rust-lang.org"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/rustup"}, - {&Ustc, "https://mirrors.ustc.edu.cn/rust-static"}, - {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/rust-static"}, - {&Zju, "https://mirrors.zju.edu.cn/rustup"}, - {&Iscas, "https://mirror.iscas.ac.cn/rustup"}, - {&RsProxyCN, "https://rsproxy.cn"} +static Source_t pl_rust_rustup_sources[] = +{ + {&UpstreamProvider, "https://static.rust-lang.org"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/rustup"}, + {&Ustc, "https://mirrors.ustc.edu.cn/rust-static"}, + {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/rust-static"}, + {&Zju, "https://mirrors.zju.edu.cn/rustup"}, + {&Iscas, "https://mirror.iscas.ac.cn/rustup"}, + {&RsProxyCN, "https://rsproxy.cn"} }; def_sources_n(pl_rust_rustup); diff --git a/src/recipe/menu.c b/src/recipe/menu.c index a6afc79..0a5f7d8 100644 --- a/src/recipe/menu.c +++ b/src/recipe/menu.c @@ -79,7 +79,7 @@ static const char *os_rockylinux [] = {"rocky", "rockylinux", NULL, t(&os_rockylinux_target)}, *os_almalinux [] = {"alma", "almalinux", NULL, t(&os_almalinux_target)}, *os_alpine [] = {"alpine", NULL, t(&os_alpine_target)}, -*os_void [] = {"void", "voidlinux", NULL, t(&os_void_target)}, +*os_voidlinux [] = {"void", "voidlinux", NULL, t(&os_voidlinux_target)}, *os_solus [] = {"solus", NULL, t(&os_solus_target)}, *os_trisquel [] = {"trisquel", NULL, t(&os_trisquel_target)}, *os_linuxlite [] = {"lite", "linuxlite", NULL, t(&os_linuxlite_target)}, @@ -110,7 +110,7 @@ static const char os_arch, os_archlinuxcn, os_manjaro, os_gentoo, - os_alpine, os_void, os_solus, + os_alpine, os_voidlinux, os_solus, os_msys2, os_freebsd, os_netbsd, os_openbsd, diff --git a/src/recipe/os/APT/Armbian.c b/src/recipe/os/APT/Armbian.c index a24a93f..b53f6fb 100644 --- a/src/recipe/os/APT/Armbian.c +++ b/src/recipe/os/APT/Armbian.c @@ -13,16 +13,17 @@ * @update 2024-11-21 */ static Source_t -os_armbian_sources[] = { - {&UpstreamProvider, "http://apt.armbian.com"}, - {&MirrorZ, "https://mirrors.cernet.edu.cn/armbian"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/armbian"}, - {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/armbian"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/armbian"}, - {&Sustech, "https://mirrors.sustech.edu.cn/armbian"}, - {&Ustc, "https://mirrors.ustc.edu.cn/armbian"}, - {&Nju, "https://mirrors.nju.edu.cn/armbian"}, - {&Ali, "https://mirrors.aliyun.com/armbian"}, +os_armbian_sources[] = +{ + {&UpstreamProvider, "http://apt.armbian.com"}, + {&MirrorZ, "https://mirrors.cernet.edu.cn/armbian"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/armbian"}, + {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/armbian"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/armbian"}, + {&Sustech, "https://mirrors.sustech.edu.cn/armbian"}, + {&Ustc, "https://mirrors.ustc.edu.cn/armbian"}, + {&Nju, "https://mirrors.nju.edu.cn/armbian"}, + {&Ali, "https://mirrors.aliyun.com/armbian"}, }; def_sources_n(os_armbian); diff --git a/src/recipe/os/APT/Debian.c b/src/recipe/os/APT/Debian.c index 01cf91c..ad9e22f 100644 --- a/src/recipe/os/APT/Debian.c +++ b/src/recipe/os/APT/Debian.c @@ -12,19 +12,19 @@ /** * @update 2024-11-21 */ -static Source_t -os_debian_sources[] = { - {&UpstreamProvider, "http://deb.debian.org/debian"}, - {&MirrorZ, "https://mirrors.cernet.edu.cn/debian/"}, - {&Ali, "https://mirrors.aliyun.com/debian"}, - {&Volcengine, "https://mirrors.volces.com/debian"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/debian"}, - {&Ustc, "https://mirrors.ustc.edu.cn/debian"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/debian"}, - {&Tencent, "https://mirrors.tencent.com/debian"}, +static Source_t os_debian_sources[] = +{ + {&UpstreamProvider, "http://deb.debian.org/debian"}, + {&MirrorZ, "https://mirrors.cernet.edu.cn/debian/"}, + {&Ali, "https://mirrors.aliyun.com/debian"}, + {&Volcengine, "https://mirrors.volces.com/debian"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/debian"}, + {&Ustc, "https://mirrors.ustc.edu.cn/debian"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/debian"}, + {&Tencent, "https://mirrors.tencent.com/debian"}, // {&Tencent_Intra, "https://mirrors.tencentyun.com/debian"}, - {&Netease, "https://mirrors.163.com/debian"}, - {&Sohu, "https://mirrors.sohu.com/debian"} + {&Netease, "https://mirrors.163.com/debian"}, + {&Sohu, "https://mirrors.sohu.com/debian"} }; def_sources_n(os_debian); diff --git a/src/recipe/os/APT/Kali-Linux.c b/src/recipe/os/APT/Kali-Linux.c index b1bd7dc..bd3d97e 100644 --- a/src/recipe/os/APT/Kali-Linux.c +++ b/src/recipe/os/APT/Kali-Linux.c @@ -12,20 +12,20 @@ /** * @update 2024-11-21 */ -static Source_t -os_kali_sources[] = { - {&UpstreamProvider, "http://http.kali.org/kali"}, - {&MirrorZ, "https://mirrors.cernet.edu.cn/kali"}, - {&Ali, "https://mirrors.aliyun.com/kali"}, - {&Volcengine, "https://mirrors.volces.com/kali"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/kali"}, - {&Ustc, "https://mirrors.ustc.edu.cn/kali"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/kali"}, - {&Tencent, "https://mirrors.tencent.com/kali"}, +static Source_t os_kali_sources[] = +{ + {&UpstreamProvider, "http://http.kali.org/kali"}, + {&MirrorZ, "https://mirrors.cernet.edu.cn/kali"}, + {&Ali, "https://mirrors.aliyun.com/kali"}, + {&Volcengine, "https://mirrors.volces.com/kali"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/kali"}, + {&Ustc, "https://mirrors.ustc.edu.cn/kali"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/kali"}, + {&Tencent, "https://mirrors.tencent.com/kali"}, // {&Tencent_Intra, "https://mirrors.tencentyun.com/kali"}, - {&Huawei, "https://mirrors.huaweicloud.com/kali"}, - {&Netease, "https://mirrors.163.com/kali"}, - {&Sohu, "https://mirrors.sohu.com/kali"} + {&Huawei, "https://mirrors.huaweicloud.com/kali"}, + {&Netease, "https://mirrors.163.com/kali"}, + {&Sohu, "https://mirrors.sohu.com/kali"} }; def_sources_n(os_kali); diff --git a/src/recipe/os/APT/Linux-Lite.c b/src/recipe/os/APT/Linux-Lite.c index 7e5e541..67967bc 100644 --- a/src/recipe/os/APT/Linux-Lite.c +++ b/src/recipe/os/APT/Linux-Lite.c @@ -11,12 +11,12 @@ /** * @update 2024-11-21 */ -static Source_t -os_linuxlite_sources[] = { - {&UpstreamProvider, "http://repo.linuxliteos.com/linuxlite/"}, - {&MirrorZ, "https://mirrors.cernet.edu.cn/linuxliteos/"}, - {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/linuxliteos/"}, - {&Nju, "https://mirror.nju.edu.cn/linuxliteos/"} +static Source_t os_linuxlite_sources[] = +{ + {&UpstreamProvider, "http://repo.linuxliteos.com/linuxlite/"}, + {&MirrorZ, "https://mirrors.cernet.edu.cn/linuxliteos/"}, + {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/linuxliteos/"}, + {&Nju, "https://mirror.nju.edu.cn/linuxliteos/"} }; def_sources_n(os_linuxlite); diff --git a/src/recipe/os/APT/Linux-Mint.c b/src/recipe/os/APT/Linux-Mint.c index 2e7670a..5b64be8 100644 --- a/src/recipe/os/APT/Linux-Mint.c +++ b/src/recipe/os/APT/Linux-Mint.c @@ -11,22 +11,22 @@ * @update 2024-11-21 更新 * @note 实际上镜像站里的内容和Ubuntu的不太一样 */ -static Source_t -os_linuxmint_sources[] = { - {&UpstreamProvider, NULL}, - {&MirrorZ, "https://mirrors.cernet.edu.cn/linuxmint/"}, - {&Ali, "http://mirrors.aliyun.com/linuxmint-packages/"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/linuxmint/"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/linuxmint/"}, - {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/linuxmint/"}, - {&Jlu, "https://mirrors.jlu.edu.cn/linuxmint/"}, - {&Ustc, "https://mirrors.ustc.edu.cn/linuxmint/"}, - {&Bjtu, "https://mirror.bjtu.edu.cn/linuxmint/"}, - {&Zju, "https://mirrors.zju.edu.cn/linuxmint/"}, - {&Sustech, "https://mirrors.sustech.edu.cn/linuxmint/"}, - {&Iscas, "https://mirror.iscas.ac.cn/linuxmint/"}, - {&Scau, "https://mirrors.scau.edu.cn/linuxmint/"}, - {&Netease, "https://mirrors.163.com/linuxmint/packages/"}, +static Source_t os_linuxmint_sources[] = +{ + {&UpstreamProvider, NULL}, + {&MirrorZ, "https://mirrors.cernet.edu.cn/linuxmint/"}, + {&Ali, "http://mirrors.aliyun.com/linuxmint-packages/"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/linuxmint/"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/linuxmint/"}, + {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/linuxmint/"}, + {&Jlu, "https://mirrors.jlu.edu.cn/linuxmint/"}, + {&Ustc, "https://mirrors.ustc.edu.cn/linuxmint/"}, + {&Bjtu, "https://mirror.bjtu.edu.cn/linuxmint/"}, + {&Zju, "https://mirrors.zju.edu.cn/linuxmint/"}, + {&Sustech, "https://mirrors.sustech.edu.cn/linuxmint/"}, + {&Iscas, "https://mirror.iscas.ac.cn/linuxmint/"}, + {&Scau, "https://mirrors.scau.edu.cn/linuxmint/"}, + {&Netease, "https://mirrors.163.com/linuxmint/packages/"}, }; def_sources_n(os_linuxmint); diff --git a/src/recipe/os/APT/ROS.c b/src/recipe/os/APT/ROS.c index 4241468..1964b5d 100644 --- a/src/recipe/os/APT/ROS.c +++ b/src/recipe/os/APT/ROS.c @@ -10,18 +10,18 @@ /** * @update 2024-04-18 */ -static Source_t -os_ros_sources[] = { - {&UpstreamProvider, NULL}, - {&Ali, "https://mirrors.aliyun.com"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn"}, - {&Ustc, "https://mirrors.ustc.edu.cn"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn"}, - {&Tencent, "https://mirrors.tencent.com"}, - // {&Tencent_Intra, "https://mirrors.tencentyun.com"}, - {&Huawei, "https://mirrors.huaweicloud.com"}, - {&Netease, "https://mirrors.163.com"}, - {&Sohu, "https://mirrors.sohu.com"} +static Source_t os_ros_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Ali, "https://mirrors.aliyun.com"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn"}, + {&Ustc, "https://mirrors.ustc.edu.cn"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn"}, + {&Tencent, "https://mirrors.tencent.com"}, + // {&Tencent_Intra, "https://mirrors.tencentyun.com"}, + {&Huawei, "https://mirrors.huaweicloud.com"}, + {&Netease, "https://mirrors.163.com"}, + {&Sohu, "https://mirrors.sohu.com"} }; def_sources_n(os_ros); diff --git a/src/recipe/os/APT/Raspberry-Pi-OS.c b/src/recipe/os/APT/Raspberry-Pi-OS.c index 13b7b9e..0e4a646 100644 --- a/src/recipe/os/APT/Raspberry-Pi-OS.c +++ b/src/recipe/os/APT/Raspberry-Pi-OS.c @@ -12,15 +12,15 @@ /** * @time 2023-09-29 更新 */ -static Source_t -os_raspberrypi_sources[] = { - {&UpstreamProvider, "https://archive.raspberrypi.com/"}, // https://archive.raspberrypi.org/ until Debian "bullseye" release - {&MirrorZ, "https://mirrors.cernet.edu.cn/raspberrypi/"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/raspberrypi/"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/raspberrypi/"}, - {&Ustc, "https://mirrors.ustc.edu.cn/raspberrypi/"}, - {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/"}, - {&Sustech, "https://mirrors.sustech.edu.cn/raspberrypi/"} +static Source_t os_raspberrypi_sources[] = +{ + {&UpstreamProvider, "https://archive.raspberrypi.com/"}, // https://archive.raspberrypi.org/ until Debian "bullseye" release + {&MirrorZ, "https://mirrors.cernet.edu.cn/raspberrypi/"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/raspberrypi/"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/raspberrypi/"}, + {&Ustc, "https://mirrors.ustc.edu.cn/raspberrypi/"}, + {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/"}, + {&Sustech, "https://mirrors.sustech.edu.cn/raspberrypi/"} }; def_sources_n(os_raspberrypi); diff --git a/src/recipe/os/APT/Trisquel.c b/src/recipe/os/APT/Trisquel.c index f388115..e6bdba6 100644 --- a/src/recipe/os/APT/Trisquel.c +++ b/src/recipe/os/APT/Trisquel.c @@ -10,16 +10,16 @@ * ------------------------------------------------------------*/ /** - * @time 2024-11-21 更新 + * @update 2024-11-21 */ -static Source_t -os_trisquel_sources[] = { - {&UpstreamProvider, NULL}, - {&MirrorZ, "https://mirrors.cernet.edu.cn/trisquel/"}, - {&Ali, "https://mirrors.aliyun.com/trisquel/"}, - {&Nju, "https://mirror.nju.edu.cn/trisquel/"}, - {&Ustc, "https://mirrors.ustc.edu.cn/trisquel/"}, - {&Iscas, "https://mirror.iscas.ac.cn/trisquel/"} +static Source_t os_trisquel_sources[] = +{ + {&UpstreamProvider, NULL}, + {&MirrorZ, "https://mirrors.cernet.edu.cn/trisquel/"}, + {&Ali, "https://mirrors.aliyun.com/trisquel/"}, + {&Nju, "https://mirror.nju.edu.cn/trisquel/"}, + {&Ustc, "https://mirrors.ustc.edu.cn/trisquel/"}, + {&Iscas, "https://mirror.iscas.ac.cn/trisquel/"} }; def_sources_n(os_trisquel); diff --git a/src/recipe/os/APT/deepin.c b/src/recipe/os/APT/deepin.c index fbc2492..cfacd67 100644 --- a/src/recipe/os/APT/deepin.c +++ b/src/recipe/os/APT/deepin.c @@ -12,17 +12,17 @@ /** * @update 2024-09-14 */ -static Source_t -os_deepin_sources[] = { - {&UpstreamProvider, "https://community-packages.deepin.com/deepin"}, - {&Ali, "https://mirrors.aliyun.com/deepin"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/deepin"}, - {&Ustc, "https://mirrors.ustc.edu.cn/deepin"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/deepin"}, - {&Tencent, "https://mirrors.tencent.com/deepin"}, +static Source_t os_deepin_sources[] = +{ + {&UpstreamProvider, "https://community-packages.deepin.com/deepin"}, + {&Ali, "https://mirrors.aliyun.com/deepin"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/deepin"}, + {&Ustc, "https://mirrors.ustc.edu.cn/deepin"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/deepin"}, + {&Tencent, "https://mirrors.tencent.com/deepin"}, // {&Tencent_Intra, "https://mirrors.tencentyun.com/deepin"}, - {&Netease, "https://mirrors.163.com/deepin"}, - {&Sohu, "https://mirrors.sohu.com/deepin"} + {&Netease, "https://mirrors.163.com/deepin"}, + {&Sohu, "https://mirrors.sohu.com/deepin"} }; def_sources_n(os_deepin); diff --git a/src/recipe/os/APT/openKylin.c b/src/recipe/os/APT/openKylin.c index f51ca1d..3c948eb 100644 --- a/src/recipe/os/APT/openKylin.c +++ b/src/recipe/os/APT/openKylin.c @@ -13,11 +13,11 @@ /** * @time 2023-09-29 更新 */ -static Source_t -os_openkylin_sources[] = { - {&UpstreamProvider, "https://archive.openkylin.top/openkylin/"}, - {&Ali, "https://mirrors.aliyun.com/openkylin/"}, - {&Netease, "https://mirrors.163.com/openkylin/"}, +static Source_t os_openkylin_sources[] = +{ + {&UpstreamProvider, "https://archive.openkylin.top/openkylin/"}, + {&Ali, "https://mirrors.aliyun.com/openkylin/"}, + {&Netease, "https://mirrors.163.com/openkylin/"}, }; def_sources_n(os_openkylin); diff --git a/src/recipe/os/Alpine-Linux.c b/src/recipe/os/Alpine-Linux.c index 4cbaefa..7c764e4 100644 --- a/src/recipe/os/Alpine-Linux.c +++ b/src/recipe/os/Alpine-Linux.c @@ -10,18 +10,18 @@ /** * @update 2024-09-14 */ -static Source_t -os_alpine_sources[] = { - {&UpstreamProvider, "http://dl-cdn.alpinelinux.org/alpine"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/alpine"}, - {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/alpine"}, - {&Sustech, "https://mirrors.sustech.edu.cn/alpine"}, - {&Zju, "https://mirrors.zju.edu.cn/alpine"}, - {&Lzuoss, "https://mirror.lzu.edu.cn/alpine"}, - {&Ali, "https://mirrors.aliyun.com/alpine"}, - {&Tencent, "https://mirrors.cloud.tencent.com/alpine"}, - // {&Tencent_Intra, "https://mirrors.cloud.tencentyun.com/alpine"}, - {&Huawei, "https://mirrors.huaweicloud.com/alpine"} +static Source_t os_alpine_sources[] = +{ + {&UpstreamProvider, "http://dl-cdn.alpinelinux.org/alpine"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/alpine"}, + {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/alpine"}, + {&Sustech, "https://mirrors.sustech.edu.cn/alpine"}, + {&Zju, "https://mirrors.zju.edu.cn/alpine"}, + {&Lzuoss, "https://mirror.lzu.edu.cn/alpine"}, + {&Ali, "https://mirrors.aliyun.com/alpine"}, + {&Tencent, "https://mirrors.cloud.tencent.com/alpine"}, + // {&Tencent_Intra, "https://mirrors.cloud.tencentyun.com/alpine"}, + {&Huawei, "https://mirrors.huaweicloud.com/alpine"} }; def_sources_n(os_alpine); diff --git a/src/recipe/os/BSD/FreeBSD.c b/src/recipe/os/BSD/FreeBSD.c index da5cb60..0c3b6a9 100644 --- a/src/recipe/os/BSD/FreeBSD.c +++ b/src/recipe/os/BSD/FreeBSD.c @@ -9,19 +9,19 @@ * ------------------------------------------------------------*/ /** - * @time 2023-09-27 更新 + * @update 2023-09-27 * - * @note by:ccmywish { - * [2023-09-24] 以下三个USTC, NJU, Netease 均维护了 freebsd-pkg freebsd-ports - * [2023-09-27] 请务必保持Nju前面有至少一个镜像,原因请查看 freebsd 的换源函数 + * @note { + * 2023-09-24: 以下三个USTC, NJU, Netease 均维护了 freebsd-pkg freebsd-ports + * 2023-09-27: 请务必保持Nju前面有至少一个镜像,原因请查看 freebsd 的换源函数 * } */ -static Source_t -os_freebsd_sources[] = { - {&UpstreamProvider, NULL}, - {&Ustc, "mirrors.ustc.edu.cn"}, - {&Nju, "mirror.nju.edu.cn"}, - {&Netease, "mirrors.163.com"}, +static Source_t os_freebsd_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Ustc, "mirrors.ustc.edu.cn"}, + {&Nju, "mirror.nju.edu.cn"}, + {&Netease, "mirrors.163.com"}, }; def_sources_n(os_freebsd); diff --git a/src/recipe/os/BSD/NetBSD.c b/src/recipe/os/BSD/NetBSD.c index 698db42..aa823f1 100644 --- a/src/recipe/os/BSD/NetBSD.c +++ b/src/recipe/os/BSD/NetBSD.c @@ -11,17 +11,17 @@ /** * @update 2024-09-14 */ -static Source_t -os_netbsd_sources[] = { - {&UpstreamProvider, NULL}, - {&Ali, "https://mirrors.aliyun.com/pkgsrc/packages/NetBSD/"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/pkgsrc/packages/NetBSD/"}, - {&Ustc, "https://mirrors.ustc.edu.cn/pkgsrc/packages/NetBSD/"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/pkgsrc/packages/NetBSD/"}, - {&Tencent, "https://mirrors.tencent.com/pkgsrc/packages/NetBSD/"}, - // {&Tencent_Intra, "https://mirrors.tencentyun.com/pkgsrc/packages/NetBSD/"}, - {&Netease, "https://mirrors.163.com/pkgsrc/packages/NetBSD/"}, - {&Sohu, "https://mirrors.sohu.com/pkgsrc/packages/NetBSD/"} +static Source_t os_netbsd_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Ali, "https://mirrors.aliyun.com/pkgsrc/packages/NetBSD/"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/pkgsrc/packages/NetBSD/"}, + {&Ustc, "https://mirrors.ustc.edu.cn/pkgsrc/packages/NetBSD/"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/pkgsrc/packages/NetBSD/"}, + {&Tencent, "https://mirrors.tencent.com/pkgsrc/packages/NetBSD/"}, + // {&Tencent_Intra, "https://mirrors.tencentyun.com/pkgsrc/packages/NetBSD/"}, + {&Netease, "https://mirrors.163.com/pkgsrc/packages/NetBSD/"}, + {&Sohu, "https://mirrors.sohu.com/pkgsrc/packages/NetBSD/"} }; def_sources_n(os_netbsd); diff --git a/src/recipe/os/BSD/OpenBSD.c b/src/recipe/os/BSD/OpenBSD.c index aea14a8..79faeb5 100644 --- a/src/recipe/os/BSD/OpenBSD.c +++ b/src/recipe/os/BSD/OpenBSD.c @@ -11,17 +11,17 @@ /** * @update 2024-09-14 */ -static Source_t -os_openbsd_sources[] = { - {&UpstreamProvider, NULL}, - {&Ali, "https://mirrors.aliyun.com/OpenBSD/"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/OpenBSD/"}, - {&Ustc, "https://mirrors.ustc.edu.cn/OpenBSD/"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/OpenBSD/"}, - {&Tencent, "https://mirrors.tencent.com/OpenBSD/"}, - // {&Tencent_Intra, "https://mirrors.tencentyun.com/OpenBSD/"}, - {&Netease, "https://mirrors.163.com/OpenBSD/"}, - {&Sohu, "https://mirrors.sohu.com/OpenBSD/"} +static Source_t os_openbsd_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Ali, "https://mirrors.aliyun.com/OpenBSD/"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/OpenBSD/"}, + {&Ustc, "https://mirrors.ustc.edu.cn/OpenBSD/"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/OpenBSD/"}, + {&Tencent, "https://mirrors.tencent.com/OpenBSD/"}, + // {&Tencent_Intra, "https://mirrors.tencentyun.com/OpenBSD/"}, + {&Netease, "https://mirrors.163.com/OpenBSD/"}, + {&Sohu, "https://mirrors.sohu.com/OpenBSD/"} }; def_sources_n(os_openbsd); diff --git a/src/recipe/os/Gentoo-Linux.c b/src/recipe/os/Gentoo-Linux.c index d834910..7c6abef 100644 --- a/src/recipe/os/Gentoo-Linux.c +++ b/src/recipe/os/Gentoo-Linux.c @@ -10,17 +10,17 @@ /** * @update 2024-09-14 */ -static Source_t -os_gentoo_sources[] = { - {&UpstreamProvider, NULL}, - {&Ali, "mirrors.aliyun.com"}, - {&Bfsu, "mirrors.bfsu.edu.cn"}, - {&Ustc, "mirrors.ustc.edu.cn"}, - {&Tuna, "mirrors.tuna.tsinghua.edu.cn"}, - {&Tencent, "mirrors.tencent.com"}, +static Source_t os_gentoo_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Ali, "mirrors.aliyun.com"}, + {&Bfsu, "mirrors.bfsu.edu.cn"}, + {&Ustc, "mirrors.ustc.edu.cn"}, + {&Tuna, "mirrors.tuna.tsinghua.edu.cn"}, + {&Tencent, "mirrors.tencent.com"}, // {&Tencent_Intra, "mirrors.tencentyun.com"}, - {&Netease, "mirrors.163.com"}, - {&Sohu, "mirrors.sohu.com"} + {&Netease, "mirrors.163.com"}, + {&Sohu, "mirrors.sohu.com"} }; def_sources_n(os_gentoo); diff --git a/src/recipe/os/OpenWrt.c b/src/recipe/os/OpenWrt.c index d27e2b4..0ec7e4f 100644 --- a/src/recipe/os/OpenWrt.c +++ b/src/recipe/os/OpenWrt.c @@ -10,18 +10,18 @@ /** * @update 2024-08-08 */ -static Source_t -os_openwrt_sources[] = { - {&UpstreamProvider, "http://downloads.openwrt.org"}, - {&MirrorZ, "https://mirrors.cernet.edu.cn/openwrt"}, - {&Ali, "https://mirrors.aliyun.com/openwrt"}, - {&Tencent, "https://mirrors.cloud.tencent.com/openwrt"}, - // {&Tencent_Intra, "https://mirrors.cloud.tencentyun.com/openwrt"}, - {&Tuna, "https://mirror.tuna.tsinghua.edu.cn/openwrt"}, - {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/openwrt"}, - {&Ustc, "https://mirrors.ustc.edu.cn/openwrt"}, - {&Pku, "https://mirrors.pku.edu.cn/openwrt"}, - {&Sustech, "https://mirrors.sustech.edu.cn/openwrt"}, +static Source_t os_openwrt_sources[] = +{ + {&UpstreamProvider, "http://downloads.openwrt.org"}, + {&MirrorZ, "https://mirrors.cernet.edu.cn/openwrt"}, + {&Ali, "https://mirrors.aliyun.com/openwrt"}, + {&Tencent, "https://mirrors.cloud.tencent.com/openwrt"}, + // {&Tencent_Intra, "https://mirrors.cloud.tencentyun.com/openwrt"}, + {&Tuna, "https://mirror.tuna.tsinghua.edu.cn/openwrt"}, + {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/openwrt"}, + {&Ustc, "https://mirrors.ustc.edu.cn/openwrt"}, + {&Pku, "https://mirrors.pku.edu.cn/openwrt"}, + {&Sustech, "https://mirrors.sustech.edu.cn/openwrt"}, }; def_sources_n(os_openwrt); diff --git a/src/recipe/os/Solus.c b/src/recipe/os/Solus.c index 0ee8080..d1aec14 100644 --- a/src/recipe/os/Solus.c +++ b/src/recipe/os/Solus.c @@ -8,20 +8,20 @@ * ------------------------------------------------------------*/ /** - * @time 2023-09-29 更新 + * @update 2023-09-29 */ -static Source_t -os_solus_sources[] = { - {&UpstreamProvider, NULL}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/solus/packages/shannon/eopkg-index.xml.xz"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/solus/packages/shannon/eopkg-index.xml.xz"}, - {&Nju, "https://mirror.nju.edu.cn/solus/packages/shannon/eopkg-index.xml.xz"} +static Source_t os_solus_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/solus/packages/shannon/eopkg-index.xml.xz"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/solus/packages/shannon/eopkg-index.xml.xz"}, + {&Nju, "https://mirror.nju.edu.cn/solus/packages/shannon/eopkg-index.xml.xz"} }; def_sources_n(os_solus); /** - * 参考: https://help.mirrors.cernet.edu.cn/solus/ + * @consult https://help.mirrors.cernet.edu.cn/solus/ */ void os_solus_setsrc (char *option) diff --git a/src/recipe/os/Void-Linux.c b/src/recipe/os/Void-Linux.c index c4b879f..8099d06 100644 --- a/src/recipe/os/Void-Linux.c +++ b/src/recipe/os/Void-Linux.c @@ -8,34 +8,34 @@ * ------------------------------------------------------------*/ /** - * @time 2023-09-24 更新 + * @update 2023-09-24 */ -static Source_t -os_void_sources[] = { - {&UpstreamProvider, "https://repo-default.voidlinux.org"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/voidlinux"}, - {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/voidlinux"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/voidlinux"} +static Source_t os_voidlinux_sources[] = +{ + {&UpstreamProvider, "https://repo-default.voidlinux.org"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/voidlinux"}, + {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/voidlinux"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/voidlinux"} }; -def_sources_n(os_void); +def_sources_n(os_voidlinux); void -os_void_getsrc (char *option) +os_voidlinux_getsrc (char *option) { char* cmd = "xbps-query -L"; chsrc_run (cmd, RunOpt_No_Last_New_Line); } /** - * 参考: https://help.mirrors.cernet.edu.cn/voidlinux/ + * @consult https://help.mirrors.cernet.edu.cn/voidlinux/ */ void -os_void_setsrc (char *option) +os_voidlinux_setsrc (char *option) { - chsrc_ensure_root (); // HELP: 不确定是否需要root + chsrc_ensure_root (); - chsrc_yield_source_and_confirm (os_void); + chsrc_yield_source_and_confirm (os_voidlinux); chsrc_ensure_dir ("/etc/xbps.d"); char *cmd = "cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/"; @@ -56,4 +56,4 @@ os_void_setsrc (char *option) chsrc_conclude (&source); } -def_target(os_void); +def_target(os_voidlinux); diff --git a/src/recipe/os/YUM/AlmaLinux.c b/src/recipe/os/YUM/AlmaLinux.c index bfc0029..7b57b2e 100644 --- a/src/recipe/os/YUM/AlmaLinux.c +++ b/src/recipe/os/YUM/AlmaLinux.c @@ -10,14 +10,14 @@ /** * @time 2024-06-12 更新 */ -static Source_t -os_almalinux_sources[] = { - {&UpstreamProvider, "http://repo.almalinux.org/almalinux"}, - {&Ali, "https://mirrors.aliyun.com/almalinux"}, - {&Volcengine, "https://mirrors.volces.com/almalinux"}, - {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/almalinux"}, - {&Zju, "https://mirrors.zju.edu.cn/almalinux"}, - {&Nju, "https://mirror.nju.edu.cn/almalinux"}, +static Source_t os_almalinux_sources[] = +{ + {&UpstreamProvider, "http://repo.almalinux.org/almalinux"}, + {&Ali, "https://mirrors.aliyun.com/almalinux"}, + {&Volcengine, "https://mirrors.volces.com/almalinux"}, + {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/almalinux"}, + {&Zju, "https://mirrors.zju.edu.cn/almalinux"}, + {&Nju, "https://mirror.nju.edu.cn/almalinux"}, }; def_sources_n(os_almalinux); diff --git a/src/recipe/os/YUM/Anolis-OS.c b/src/recipe/os/YUM/Anolis-OS.c index 42b6374..0c12b62 100644 --- a/src/recipe/os/YUM/Anolis-OS.c +++ b/src/recipe/os/YUM/Anolis-OS.c @@ -10,13 +10,13 @@ * ------------------------------------------------------------*/ /** - * @time 2024-06-12 更新 + * @update 2024-06-12 */ -static Source_t -os_anolis_sources[] = { - {&UpstreamProvider, NULL}, - {&Ali, "https://mirrors.aliyun.com/anolis"}, - {&Hust, "https://mirrors.hust.edu.cn/anolis"} +static Source_t os_anolis_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Ali, "https://mirrors.aliyun.com/anolis"}, + {&Hust, "https://mirrors.hust.edu.cn/anolis"} }; def_sources_n(os_anolis); diff --git a/src/recipe/os/YUM/Fedora-Linux.c b/src/recipe/os/YUM/Fedora-Linux.c index aaee354..5a9c9eb 100644 --- a/src/recipe/os/YUM/Fedora-Linux.c +++ b/src/recipe/os/YUM/Fedora-Linux.c @@ -14,17 +14,17 @@ /** * @update 2024-11-04 */ -static Source_t -os_fedora_sources[] = { - {&UpstreamProvider, "http://download.example/pub/fedora/linux"}, - {&Ali, "https://mirrors.aliyun.com/fedora"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/fedora"}, - {&Ustc, "https://mirrors.ustc.edu.cn/fedora"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/fedora"}, - {&Tencent, "https://mirrors.tencent.com/fedora"}, +static Source_t os_fedora_sources[] = +{ + {&UpstreamProvider, "http://download.example/pub/fedora/linux"}, + {&Ali, "https://mirrors.aliyun.com/fedora"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/fedora"}, + {&Ustc, "https://mirrors.ustc.edu.cn/fedora"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/fedora"}, + {&Tencent, "https://mirrors.tencent.com/fedora"}, // {&Tencent_Intra, "https://mirrors.tencentyun.com/fedora"}, - {&Netease, "https://mirrors.163.com/fedora"}, - {&Sohu, "https://mirrors.sohu.com/fedora"} + {&Netease, "https://mirrors.163.com/fedora"}, + {&Sohu, "https://mirrors.sohu.com/fedora"} }; def_sources_n(os_fedora); diff --git a/src/recipe/os/YUM/Rocky-Linux.c b/src/recipe/os/YUM/Rocky-Linux.c index 0c33636..4dc823d 100644 --- a/src/recipe/os/YUM/Rocky-Linux.c +++ b/src/recipe/os/YUM/Rocky-Linux.c @@ -8,20 +8,20 @@ * ------------------------------------------------------------*/ /** - * @time 2024-06-12 更新 + * @update 2024-06-12 */ -static Source_t -os_rockylinux_sources[] = { - {&UpstreamProvider, NULL}, - {&MirrorZ, "https://mirrors.cernet.edu.cn/rocky"}, - {&Ali, "https://mirrors.aliyun.com/rockylinux"}, - {&Volcengine, "https://mirrors.volces.com/rockylinux"}, - {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/rocky"}, - {&Sustech, "https://mirrors.sustech.edu.cn/rocky-linux"}, - {&Zju, "https://mirrors.zju.edu.cn/rocky"}, - {&Lzuoss, "https://mirror.lzu.edu.cn/rocky"}, - {&Sohu, "https://mirrors.sohu.com/Rocky"}, - {&Netease, "https://mirrors.163.com/rocky"} +static Source_t os_rockylinux_sources[] = +{ + {&UpstreamProvider, NULL}, + {&MirrorZ, "https://mirrors.cernet.edu.cn/rocky"}, + {&Ali, "https://mirrors.aliyun.com/rockylinux"}, + {&Volcengine, "https://mirrors.volces.com/rockylinux"}, + {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/rocky"}, + {&Sustech, "https://mirrors.sustech.edu.cn/rocky-linux"}, + {&Zju, "https://mirrors.zju.edu.cn/rocky"}, + {&Lzuoss, "https://mirror.lzu.edu.cn/rocky"}, + {&Sohu, "https://mirrors.sohu.com/Rocky"}, + {&Netease, "https://mirrors.163.com/rocky"} }; def_sources_n(os_rockylinux); diff --git a/src/recipe/os/YUM/common.h b/src/recipe/os/YUM/common.h index ff74396..068c6b5 100644 --- a/src/recipe/os/YUM/common.h +++ b/src/recipe/os/YUM/common.h @@ -7,7 +7,7 @@ * Last Modified : <2024-08-16> * ------------------------------------------------------------*/ -// #define OS_Yum_SourceList "/etc/yum.repos" -#define OS_Yum_SourceList_D "/etc/yum.repos.d/" +// #define OS_Yum_SourceList "/etc/yum.repos" +#define OS_Yum_SourceList_D "/etc/yum.repos.d/" -#define OS_openEuler_SourceList "openEuler.repo" +#define OS_openEuler_SourceList "openEuler.repo" diff --git a/src/recipe/os/YUM/openEuler.c b/src/recipe/os/YUM/openEuler.c index 1ca1dba..e0378e9 100644 --- a/src/recipe/os/YUM/openEuler.c +++ b/src/recipe/os/YUM/openEuler.c @@ -11,17 +11,17 @@ /** * @update 2024-09-14 */ -static Source_t -os_openeuler_sources[] = { - {&UpstreamProvider, "https://repo.openeuler.org/"}, - {&Ali, "https://mirrors.aliyun.com/openeuler/"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/openeuler/"}, - {&Ustc, "https://mirrors.ustc.edu.cn/openeuler/"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/openeuler/"}, - {&Tencent, "https://mirrors.tencent.com/openeuler/"}, - // {&Tencent_Intra, "https://mirrors.tencentyun.com/openeuler/"}, - {&Netease, "https://mirrors.163.com/openeuler/"}, - {&Sohu, "https://mirrors.sohu.com/openeuler/"} +static Source_t os_openeuler_sources[] = +{ + {&UpstreamProvider, "https://repo.openeuler.org/"}, + {&Ali, "https://mirrors.aliyun.com/openeuler/"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/openeuler/"}, + {&Ustc, "https://mirrors.ustc.edu.cn/openeuler/"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/openeuler/"}, + {&Tencent, "https://mirrors.tencent.com/openeuler/"}, + // {&Tencent_Intra, "https://mirrors.tencentyun.com/openeuler/"}, + {&Netease, "https://mirrors.163.com/openeuler/"}, + {&Sohu, "https://mirrors.sohu.com/openeuler/"} }; def_sources_n(os_openeuler); diff --git a/src/recipe/os/openSUSE.c b/src/recipe/os/openSUSE.c index 808c6aa..8c2cc2b 100644 --- a/src/recipe/os/openSUSE.c +++ b/src/recipe/os/openSUSE.c @@ -10,18 +10,18 @@ /** * @update 2024-08-16 */ -static Source_t -os_opensuse_sources[] = { - {&UpstreamProvider, NULL}, - {&Ali, "https://mirrors.aliyun.com/opensuse"}, - {&Volcengine, "https://mirrors.volces.com/opensuse"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/opensuse"}, - {&Ustc, "https://mirrors.ustc.edu.cn/opensuse"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/opensuse"}, - {&Tencent, "https://mirrors.tencent.com/opensuse"}, - // {&Tencent_Intra, "https://mirrors.tencentyun.com/opensuse"}, - {&Netease, "https://mirrors.163.com/opensuse"}, - {&Sohu, "https://mirrors.sohu.com/opensuse"} +static Source_t os_opensuse_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Ali, "https://mirrors.aliyun.com/opensuse"}, + {&Volcengine, "https://mirrors.volces.com/opensuse"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/opensuse"}, + {&Ustc, "https://mirrors.ustc.edu.cn/opensuse"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/opensuse"}, + {&Tencent, "https://mirrors.tencent.com/opensuse"}, + // {&Tencent_Intra, "https://mirrors.tencentyun.com/opensuse"}, + {&Netease, "https://mirrors.163.com/opensuse"}, + {&Sohu, "https://mirrors.sohu.com/opensuse"} }; def_sources_n(os_opensuse); diff --git a/src/recipe/os/pacman/Arch-Linux.c b/src/recipe/os/pacman/Arch-Linux.c index 04fa104..c640593 100644 --- a/src/recipe/os/pacman/Arch-Linux.c +++ b/src/recipe/os/pacman/Arch-Linux.c @@ -12,33 +12,34 @@ * @update 2024-07-03 * @note 不要给后面加 / ,因为ARM情况下,还要额外加一个 arm 后缀 */ -static Source_t -os_arch_sources[] = { - {&UpstreamProvider, NULL}, - {&Ali, "https://mirrors.aliyun.com/archlinux"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/archlinux"}, - {&Ustc, "https://mirrors.ustc.edu.cn/archlinux"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/archlinux"}, - {&Tencent, "https://mirrors.tencent.com/archlinux"}, +static Source_t os_arch_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Ali, "https://mirrors.aliyun.com/archlinux"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/archlinux"}, + {&Ustc, "https://mirrors.ustc.edu.cn/archlinux"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/archlinux"}, + {&Tencent, "https://mirrors.tencent.com/archlinux"}, // {&Tencent_Intra, "https://mirrors.tencentyun.com/archlinux"}, - {&Huawei, "https://mirrors.huaweicloud.com/archlinux"}, // 不支持 archlinuxcn - {&Netease, "https://mirrors.163.com/archlinux"}, // archlinuxcn 的URL和其他镜像站不同 + {&Huawei, "https://mirrors.huaweicloud.com/archlinux"}, // 不支持 archlinuxcn + {&Netease, "https://mirrors.163.com/archlinux"}, // archlinuxcn 的URL和其他镜像站不同 // {&Sohu, "https://mirrors.sohu.com/archlinux"} // 不支持 archlinuxcn }, /** - * @time 2024-07-03 更新 + * @update 2024-07-03 * @note 根据 GitHub:@zheng7fu2 建议,拆分 archlinuxcn 出来 */ -os_archlinuxcn_sources[] = { - {&UpstreamProvider, "https://repo.archlinuxcn.org/"}, - {&Ali, "https://mirrors.aliyun.com/archlinuxcn/"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/archlinuxcn/"}, - {&Ustc, "https://mirrors.ustc.edu.cn/archlinuxcn/"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/"}, - {&Tencent, "https://mirrors.cloud.tencent.com/archlinuxcn/"}, +os_archlinuxcn_sources[] = +{ + {&UpstreamProvider, "https://repo.archlinuxcn.org/"}, + {&Ali, "https://mirrors.aliyun.com/archlinuxcn/"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/archlinuxcn/"}, + {&Ustc, "https://mirrors.ustc.edu.cn/archlinuxcn/"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/"}, + {&Tencent, "https://mirrors.cloud.tencent.com/archlinuxcn/"}, // {&Tencent_Intra, "https://mirrors.cloud.tencentyun.com/archlinuxcn/"}, - {&Netease, "https://mirrors.163.com/archlinux-cn/"} + {&Netease, "https://mirrors.163.com/archlinux-cn/"} }; def_sources_n(os_arch); def_sources_n(os_archlinuxcn); diff --git a/src/recipe/os/pacman/MSYS2.c b/src/recipe/os/pacman/MSYS2.c index 4b71f1d..d36de89 100644 --- a/src/recipe/os/pacman/MSYS2.c +++ b/src/recipe/os/pacman/MSYS2.c @@ -10,17 +10,17 @@ /** * @time 2024-04-18 更新 */ -static Source_t -os_msys2_sources[] = { - {&UpstreamProvider, NULL}, - {&Ali, "https://mirrors.aliyun.com/msys2"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/msys2"}, - {&Ustc, "https://mirrors.ustc.edu.cn/msys2"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/msys2"}, - {&Tencent, "https://mirrors.tencent.com/msys2"}, - {&Huawei, "https://mirrors.huaweicloud.com/msys2"}, - {&Netease, "https://mirrors.163.com/msys2"}, - {&Sohu, "https://mirrors.sohu.com/msys2"} +static Source_t os_msys2_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Ali, "https://mirrors.aliyun.com/msys2"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/msys2"}, + {&Ustc, "https://mirrors.ustc.edu.cn/msys2"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/msys2"}, + {&Tencent, "https://mirrors.tencent.com/msys2"}, + {&Huawei, "https://mirrors.huaweicloud.com/msys2"}, + {&Netease, "https://mirrors.163.com/msys2"}, + {&Sohu, "https://mirrors.sohu.com/msys2"} }; def_sources_n(os_msys2); diff --git a/src/recipe/ware/Anaconda.c b/src/recipe/ware/Anaconda.c index 29a4eca..da701bc 100644 --- a/src/recipe/ware/Anaconda.c +++ b/src/recipe/ware/Anaconda.c @@ -11,13 +11,13 @@ * @time 2023-09-10 更新 * @note 这些链接将会在setsrc函数中补充完整 */ -static Source_t -wr_anaconda_sources[] = { - {&UpstreamProvider, "https://repo.anaconda.com/"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/anaconda/"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/anaconda/"}, - {&Zju, "https://mirrors.zju.edu.cn/anaconda/"}, - {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/anaconda"} +static Source_t wr_anaconda_sources[] = +{ + {&UpstreamProvider, "https://repo.anaconda.com/"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/anaconda/"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/anaconda/"}, + {&Zju, "https://mirrors.zju.edu.cn/anaconda/"}, + {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/anaconda"} }; def_sources_n(wr_anaconda); diff --git a/src/recipe/ware/CocoaPods.c b/src/recipe/ware/CocoaPods.c index 3118810..dbdd9b7 100644 --- a/src/recipe/ware/CocoaPods.c +++ b/src/recipe/ware/CocoaPods.c @@ -8,18 +8,19 @@ * ------------------------------------------------------------*/ /** - * @time 2024-06-08 更新 + * @update 2024-06-08 */ -static Source_t -wr_cocoapods_sources[] = { - {&UpstreamProvider, NULL}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/git/CocoaPods/Specs.git"} +static Source_t wr_cocoapods_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/git/CocoaPods/Specs.git"} }; def_sources_n(wr_cocoapods); + /** - * 参考:https://mirrors.tuna.tsinghua.edu.cn/help/CocoaPods/ + * @consult https://mirrors.tuna.tsinghua.edu.cn/help/CocoaPods/ */ void wr_cocoapods_setsrc (char *option) diff --git a/src/recipe/ware/Docker-Hub.c b/src/recipe/ware/Docker-Hub.c index 6d191b6..9984f41 100644 --- a/src/recipe/ware/Docker-Hub.c +++ b/src/recipe/ware/Docker-Hub.c @@ -9,19 +9,21 @@ * Last Modified : <2024-11-22> * ------------------------------------------------------------*/ -static MirrorSite_t -DaoCloud = { +static MirrorSite_t DaoCloud = +{ "daocloud", "DaoCloud","上海道客网络科技有限公司", "https://www.daocloud.io/", // 没有找到 DaoCloud 合适的下载链接,先随便给一个,以规避 chsrc 自动测速时所有 dockerhub 镜像站都没有测速链接带来的 bug {NotSkip, NA, NA, "https://qiniu-download-public.daocloud.io/DaoCloud_Enterprise/dce5/offline-community-v0.18.0-amd64.tar"} }, -Fit2Cloud = { +Fit2Cloud = +{ "fit2cloud", "FIT2CLOUD", "杭州飞致云信息科技有限公司", "https://www.fit2cloud.com/", {SKIP, ToFill, ToFill, NULL} }, -Huecker = { +Huecker = +{ "huecker", "(Russia) Huecker", "俄罗斯 Huecker.io", "https://huecker.io/", // 同 DaoCloud,没有合适的下载链接,先随便给一个,以避免 bug {NotSkip, NA, NA, "https://huecker.io/en/use.html"} @@ -36,18 +38,18 @@ Huecker = { * @consult https://gist.github.com/y0ngb1n/7e8f16af3242c7815e7ca2f0833d3ea6 */ -static Source_t -wr_dockerhub_sources[] = { - {&UpstreamProvider, NULL}, - // {&Ustc, "https://docker.mirrors.ustc.edu.cn/"}, +static Source_t wr_dockerhub_sources[] = +{ + {&UpstreamProvider, NULL}, + // {&Ustc, "https://docker.mirrors.ustc.edu.cn/"}, // https://github.com/DaoCloud/public-image-mirror - {&DaoCloud, "https://docker.m.daocloud.io"}, - {&Fit2Cloud, "https://docker.1panel.live"}, + {&DaoCloud, "https://docker.m.daocloud.io"}, + {&Fit2Cloud, "https://docker.1panel.live"}, // 暂时加入,未来若国内镜像恢复,将删除 // https://huecker.io/en/use.html#unbanned - {&Huecker, "https://huecker.io"} + {&Huecker, "https://huecker.io"} }; def_sources_n(wr_dockerhub); diff --git a/src/recipe/ware/Emacs.c b/src/recipe/ware/Emacs.c index 8f64485..eba0739 100644 --- a/src/recipe/ware/Emacs.c +++ b/src/recipe/ware/Emacs.c @@ -7,8 +7,8 @@ * Last Modified : <2024-11-21> * ------------------------------------------------------------*/ -static MirrorSite_t -EmacsChina = { +static MirrorSite_t EmacsChina = +{ "emacschina", "EmacsChina", "Emacs China 社区", "https://elpamirror.emacs-china.org/", {SKIP, ToFill, ToFill, NULL} }; @@ -17,15 +17,15 @@ EmacsChina = { * @update 2023-09-10 * @note Emacs用户往往只需要一次性换源,只会极少次调用 chsrc,我们只给用户提供文档 */ -Source_t -wr_emacs_sources[] = { - {&UpstreamProvider, NULL}, - {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/docs/emacs-elpa"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/help/elpa/"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/help/elpa/"}, - {&Ustc, "https://mirrors.ustc.edu.cn/help/elpa.html"}, - {&Zju, "https://mirrors.zju.edu.cn/docs/elpa/"}, - {&EmacsChina, "https://elpamirror.emacs-china.org/"} +Source_t wr_emacs_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/docs/emacs-elpa"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/help/elpa/"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/help/elpa/"}, + {&Ustc, "https://mirrors.ustc.edu.cn/help/elpa.html"}, + {&Zju, "https://mirrors.zju.edu.cn/docs/elpa/"}, + {&EmacsChina, "https://elpamirror.emacs-china.org/"} }; def_sources_n(wr_emacs); diff --git a/src/recipe/ware/Flathub.c b/src/recipe/ware/Flathub.c index 0e85309..1c954aa 100644 --- a/src/recipe/ware/Flathub.c +++ b/src/recipe/ware/Flathub.c @@ -11,16 +11,16 @@ * @update 2023-09-11 * @note 目前只有一个源 */ -static Source_t -wr_flathub_sources[] = { - {&UpstreamProvider, NULL}, - {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/flathub"}, +static Source_t wr_flathub_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/flathub"}, }; def_sources_n(wr_flathub); /** - * 参考: https://mirrors.sjtug.sjtu.edu.cn/docs/flathub + * @consult https://mirrors.sjtug.sjtu.edu.cn/docs/flathub */ void wr_flathub_setsrc (char *option) diff --git a/src/recipe/ware/Guix.c b/src/recipe/ware/Guix.c index c221693..bea3bf2 100644 --- a/src/recipe/ware/Guix.c +++ b/src/recipe/ware/Guix.c @@ -11,16 +11,16 @@ * @update 2023-09-11 * @note 目前只有一个源 */ -static Source_t -wr_guix_sources[] = { - {&UpstreamProvider, NULL}, - {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/git/guix.git"} +static Source_t wr_guix_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/git/guix.git"} }; def_sources_n(wr_guix); /** - * 参考: https://mirrors.sjtug.sjtu.edu.cn/docs/guix + * @consult https://mirrors.sjtug.sjtu.edu.cn/docs/guix */ void wr_guix_setsrc (char *option) diff --git a/src/recipe/ware/Homebrew.c b/src/recipe/ware/Homebrew.c index 1c88faf..d834439 100644 --- a/src/recipe/ware/Homebrew.c +++ b/src/recipe/ware/Homebrew.c @@ -16,12 +16,13 @@ * } */ static Source_t -wr_homebrew_sources[] = { - {&UpstreamProvider, NULL}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/"}, - {&Zju, "https://mirrors.zju.edu.cn/"}, - {&Sustech, "https://mirrors.sustech.edu.cn/"} +wr_homebrew_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/"}, + {&Zju, "https://mirrors.zju.edu.cn/"}, + {&Sustech, "https://mirrors.sustech.edu.cn/"} }; def_sources_n(wr_homebrew); diff --git a/src/recipe/ware/Nix.c b/src/recipe/ware/Nix.c index f52a960..d961329 100644 --- a/src/recipe/ware/Nix.c +++ b/src/recipe/ware/Nix.c @@ -14,10 +14,10 @@ * 2. 这些链接将会在setsrc函数中补充完整 * } */ -static Source_t -wr_nix_sources[] = { - {&UpstreamProvider, NULL}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/nix-channels/"} +static Source_t wr_nix_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/nix-channels/"} }; def_sources_n(wr_nix); diff --git a/src/recipe/ware/TeX-Live.c b/src/recipe/ware/TeX-Live.c index 083d0f1..6112082 100644 --- a/src/recipe/ware/TeX-Live.c +++ b/src/recipe/ware/TeX-Live.c @@ -10,15 +10,15 @@ /** * @update 2023-09-10 */ -static Source_t -wr_tex_sources[] = { - {&UpstreamProvider, NULL}, - {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/ctan/systems/texlive/tlnet"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/CTAN/systems/texlive/tlnet"}, - {&Lzuoss, "https://mirror.lzu.edu.cn/CTAN/systems/texlive/tlnet"}, - {&Jlu, "https://mirrors.jlu.edu.cn/CTAN/systems/texlive/tlnet"}, - {&Sustech, "https://mirrors.sustech.edu.cn/CTAN/systems/texlive/tlnet"} +static Source_t wr_tex_sources[] = +{ + {&UpstreamProvider, NULL}, + {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/ctan/systems/texlive/tlnet"}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet"}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/CTAN/systems/texlive/tlnet"}, + {&Lzuoss, "https://mirror.lzu.edu.cn/CTAN/systems/texlive/tlnet"}, + {&Jlu, "https://mirrors.jlu.edu.cn/CTAN/systems/texlive/tlnet"}, + {&Sustech, "https://mirrors.sustech.edu.cn/CTAN/systems/texlive/tlnet"} }; def_sources_n(wr_tex); diff --git a/src/recipe/ware/WinGet.c b/src/recipe/ware/WinGet.c index 445a660..e9402b4 100644 --- a/src/recipe/ware/WinGet.c +++ b/src/recipe/ware/WinGet.c @@ -11,10 +11,10 @@ * @update 2024-06-07 * @note 目前仅有一个源 */ -static Source_t -wr_winget_sources[] = { - {&UpstreamProvider, "https://cdn.winget.microsoft.com/cache"}, - {&Ustc, "https://mirrors.ustc.edu.cn/winget-source"}, +static Source_t wr_winget_sources[] = +{ + {&UpstreamProvider, "https://cdn.winget.microsoft.com/cache"}, + {&Ustc, "https://mirrors.ustc.edu.cn/winget-source"}, }; def_sources_n(wr_winget); @@ -25,7 +25,10 @@ wr_winget_getsrc (char *option) chsrc_run ("winget source list", RunOpt_Default); } -/* 参考:https://mirrors.ustc.edu.cn/help/winget-source.html */ + +/** + * @consult https://mirrors.ustc.edu.cn/help/winget-source.html + */ void wr_winget_setsrc (char *option) { @@ -38,6 +41,7 @@ wr_winget_setsrc (char *option) chsrc_conclude (&source); } + void wr_winget_resetsrc (char *option) {