Add basic support for clojure

This commit is contained in:
Aoran Zeng 2023-09-10 18:44:34 +08:00
parent 93b64199f8
commit f3d301ce11
2 changed files with 75 additions and 29 deletions

35
chsrc.c
View File

@ -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
};

69
chsrc.h
View File

@ -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);