44 * File Authors : Aoran Zeng <[email protected] > 55 * Contributors : Nil Null <[email protected] > 66 * Created On : <2023-09-10>
7- * Last Modified : <2024-08-09 >
7+ * Last Modified : <2025-07-14 >
88 * ------------------------------------------------------------*/
99
10+ #include "rawstr4c.h"
11+
1012/**
11- * @update 2023-09-10
12- * @note 不太好换,且用户可能不多,我们暂时只给用户提供文档
13+ * @update 2025-07-14
1314 */
1415static Source_t pl_clojure_sources [] =
1516{
16- {& UpstreamProvider , NULL },
17- {& Tuna , "https://mirrors.tuna.tsinghua.edu.cn/help/clojars/" },
18- {& Ustc , "https://mirrors.ustc.edu.cn/help/clojars.html" }
17+ {& UpstreamProvider , NULL , NULL },
18+ {& MirrorZ , "https://mirrors.cernet.edu.cn/clojars/" , DelegateToMirror },
19+ {& Tuna , "https://mirrors.tuna.tsinghua.edu.cn/clojars/" , DelegateToMirror },
20+ {& Nju , "https://mirror.nju.edu.cn/clojars/" , DelegateToMirror },
21+ {& Nyist , "https://mirror.nyist.edu.cn/clojars/" , DelegateToMirror },
22+ {& Ustc , "https://mirrors.ustc.edu.cn/clojars/" , DelegateToMirror },
23+ {& Iscas , "https://mirror.iscas.ac.cn/clojars/" , DelegateToMirror }
1924};
2025def_sources_n (pl_clojure );
2126
@@ -25,11 +30,43 @@ pl_clojure_setsrc (char *option)
2530{
2631 chsrc_yield_source_and_confirm (pl_clojure );
2732
28- chsrc_note2 ("抱歉,Clojure换源较复杂,可手动查阅并换源:" );
29- p (source .url );
33+ if (chsrc_in_local_mode ())
34+ {
35+ chsrc_note2 ("请在项目根目录中的 project.clj 中手动添加 :mirrors 关键字:" );
36+ char * config = xy_str_gsub (RAWSTR_pl_project_clj , "@url@" , source .url );
37+ println (config );
38+ }
39+ else
40+ {
41+ chsrc_note2 ("请在 ~/.lein/projfiles.clj 中手动添加 :mirrors 关键字:" );
42+ char * config = xy_str_gsub (RAWSTR_pl_projfiles_clj , "@url@" , source .url );
43+ println (config );
44+ }
3045
3146 chsrc_determine_chgtype (ChgType_Manual );
3247 chsrc_conclude (& source );
3348}
3449
35- def_target_s (pl_clojure );
50+
51+ /**
52+ * chsrc ls clojure
53+ */
54+ Feature_t
55+ pl_clojure_feat (char * option )
56+ {
57+ Feature_t f = {0 };
58+
59+ f .can_get = false;
60+ f .can_reset = false;
61+
62+ f .cap_locally = CanNot ;
63+ f .cap_locally_explain = NULL ;
64+ f .can_english = false;
65+
66+ f .can_user_define = true;
67+
68+ f .note = NULL ;
69+ return f ;
70+ }
71+
72+ def_target_sf (pl_clojure );
0 commit comments