diff --git a/chsrc.c b/chsrc.c index 4319993..0b63e4b 100644 --- a/chsrc.c +++ b/chsrc.c @@ -737,6 +737,27 @@ pl_java_setsrc (char* option) +void +pl_clojure_setsrc(char* option) +{ + int index = 0; + if (NULL!=option) { + index = lets_find_mirror(pl_clojure, option); + } else { + index = lets_test_speed(pl_clojure); + } + + source_info source = pl_clojure_sources[index]; + chsrc_say_selection (&source); + + xy_warn("chsrc: 抱歉,Clojure换源较复杂,您可手动查阅并换源:"); + puts(source.url); + chsrc_say_thanks (&source); +} + + + + void pl_dart_getsrc(char* option) { @@ -918,6 +939,11 @@ pl_julia_setsrc (char* option) + + + + + /** * @note 不同架构下换源不一样 */ @@ -1533,6 +1559,9 @@ wr_emacs_setsrc(char* option) chsrc_say_thanks (&source); } + + + /************************************** Begin Target Matrix ****************************************/ def_target_info(pl_ruby); def_target_info(pl_python); @@ -1547,7 +1576,8 @@ def_target_info(pl_r); def_target_info(pl_julia); target_info - pl_dotnet_target = {pl_dotnet_setsrc, NULL, pl_dotnet_sources, pl_dotnet_sources_n}; + pl_clojure_target = {pl_clojure_setsrc, NULL, pl_clojure_sources, pl_clojure_sources_n}, + pl_dotnet_target = {pl_dotnet_setsrc, NULL, pl_dotnet_sources, pl_dotnet_sources_n}; #define targetinfo(t) (const char*)t @@ -1560,6 +1590,7 @@ static const char *pl_go [] = {"go", "golang", "goproxy", NULL, targetinfo(&pl_go_target)} , *pl_rust [] = {"rust", "cargo", "crate", "crates", NULL, targetinfo(&pl_rust_target)}, *pl_java [] = {"java", "maven", "gradle", NULL, targetinfo(&pl_java_target)}, +*pl_clojure[] ={"clojure","clojars","leiningen", "lein", NULL, targetinfo(&pl_clojure_target)}, *pl_dart [] = {"dart", "pub", NULL, targetinfo(&pl_dart_target)}, *pl_dotnet[] = {"nuget", "net", ".net", "dotnet", NULL, targetinfo(&pl_dotnet_target)}, *pl_r [] = {"r", "cran", NULL, targetinfo(&pl_r_target)}, @@ -1567,7 +1598,7 @@ static const char **pl_packagers[] = { pl_ruby, pl_python, pl_nodejs, pl_perl, pl_php, - pl_rust, pl_go, /*pl_dotnet,*/ pl_java, pl_dart, + pl_rust, pl_go, /*pl_dotnet,*/ pl_java, pl_clojure, pl_dart, pl_r, pl_julia }; diff --git a/chsrc.h b/chsrc.h index 746d422..ecdf83a 100644 --- a/chsrc.h +++ b/chsrc.h @@ -192,33 +192,18 @@ pl_perl_sources[] = { }, + /** * 2023-09-04 更新 * - * @note 以下注释的,是不含有bioconductor的镜像站, - * 我们在换cran的同时,也直接帮助用户换bioconductor + * @note 缺少教育网或开源社区软件源 */ -pl_r_sources[] = { - {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/cran/"}, - // {&Ali, "https://mirrors.aliyun.com/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/"}, +pl_php_sources[] = { + {&Ali, "https://mirrors.aliyun.com/composer/"}, + {&Tencent, "https://mirrors.tencent.com/composer/"} }, -/** - * 2023-09-05 更新 - * - * @note 缺少商业公司或开源社区软件源 - */ -pl_julia_sources[] = { - {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/julia"}, - {&Pku, "https://mirrors.pku.edu.cn/julia"}, - {&Nju, "https://mirror.nju.edu.cn/julia"} -}, - /** * 2023-09-04 更新 @@ -258,6 +243,17 @@ pl_java_sources[] = { }, +/** + * 2023-09-10 更新 + * + * @note 不太好换,且用户可能不多,我们暂时只给用户提供文档 + */ +pl_clojure_sources[] = { + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/help/clojars/"}, + {&Ustc, "https://mirrors.ustc.edu.cn/help/clojars.html"} +}, + + /** * 2023-08-30 更新 * @@ -286,15 +282,34 @@ pl_dart_sources[] = { /** * 2023-09-04 更新 * - * @note 缺少教育网或开源社区软件源 + * @note 以下注释的,是不含有bioconductor的镜像站, + * 我们在换cran的同时,也直接帮助用户换bioconductor */ -pl_php_sources[] = { - {&Ali, "https://mirrors.aliyun.com/composer/"}, - {&Tencent, "https://mirrors.tencent.com/composer/"} +pl_r_sources[] = { + {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/cran/"}, + // {&Ali, "https://mirrors.aliyun.com/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/"}, +}, + + +/** + * 2023-09-05 更新 + * + * @note 缺少商业公司或开源社区软件源 + */ +pl_julia_sources[] = { + {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/julia"}, + {&Pku, "https://mirrors.pku.edu.cn/julia"}, + {&Nju, "https://mirror.nju.edu.cn/julia"} }; + + /** * 2023-09-01 更新 * @@ -569,9 +584,9 @@ chsrc_say_thanks (source_info* source) #define def_target_sources_n(t) const size_t t##_sources_n = xy_arylen(t##_sources) def_target_sources_n(pl_ruby); def_target_sources_n(pl_python); def_target_sources_n(pl_nodejs); def_target_sources_n(pl_perl); def_target_sources_n(pl_php); def_target_sources_n(pl_go); -def_target_sources_n(pl_rust); def_target_sources_n(pl_java); def_target_sources_n(pl_dotnet); -def_target_sources_n(pl_dart); -def_target_sources_n(pl_r); def_target_sources_n(pl_julia); +def_target_sources_n(pl_rust); def_target_sources_n(pl_java); def_target_sources_n(pl_clojure); +def_target_sources_n(pl_dotnet); def_target_sources_n(pl_dart); +def_target_sources_n(pl_r); def_target_sources_n(pl_julia); def_target_sources_n(os_ubuntu); def_target_sources_n(os_debian); def_target_sources_n(os_fedora); def_target_sources_n(os_kali); def_target_sources_n(os_openbsd); def_target_sources_n(os_msys2);