diff --git a/include/source.h b/include/source.h index 7a22793..06e422b 100644 --- a/include/source.h +++ b/include/source.h @@ -126,19 +126,4 @@ typedef struct { -/** - * @time 2023-09-10 更新 - * @note 不太好换,且用户可能不多,我们暂时只给用户提供文档 - */ -static SourceInfo -pl_clojure_sources[] = { - {&Upstream, NULL}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/help/clojars/"}, - {&Ustc, "https://mirrors.ustc.edu.cn/help/clojars.html"} -}; - - #define def_sources_n(t) const size_t t##_sources_n = xy_arylen(t##_sources) - - -def_sources_n(pl_clojure); diff --git a/src/chsrc.c b/src/chsrc.c index 2a40f7c..6092d0d 100644 --- a/src/chsrc.c +++ b/src/chsrc.c @@ -37,19 +37,7 @@ #include "recipe/lang/r.c" #include "recipe/lang/julia.c" #include "recipe/lang/NuGet.c" - - -void -pl_clojure_setsrc (char *option) -{ - SourceInfo source; - chsrc_yield_source (pl_clojure); - chsrc_confirm_source (&source); - - chsrc_note2 ("抱歉,Clojure换源较复杂,您可手动查阅并换源:"); - puts (source.url); - chsrc_say_lastly (&source, ChsrcTypeManual); -} +#include "recipe/lang/Clojure.c" @@ -69,7 +57,6 @@ pl_clojure_setsrc (char *option) #include "recipe/os/apt-family/openKylin.c" #include "recipe/os/apt-family/deepin.c" - #include "recipe/os/yum-family/common.h" #include "recipe/os/yum-family/Fedora-Linux.c" #include "recipe/os/yum-family/AlmaLinux.c" @@ -77,25 +64,23 @@ pl_clojure_setsrc (char *option) #include "recipe/os/yum-family/openEuler.c" #include "recipe/os/yum-family/Anolis-OS.c" -#include "recipe/os/opensuse.c" - - #include "recipe/os/pacman-family/Arch-Linux.c" #include "recipe/os/pacman-family/Manjaro-Linux.c" #include "recipe/os/pacman-family/MSYS2.c" +#include "recipe/os/opensuse.c" #include "recipe/os/gentoo.c" #include "recipe/os/alpine.c" #include "recipe/os/void.c" #include "recipe/os/solus.c" #include "recipe/os/openwrt.c" - #include "recipe/os/BSD/FreeBSD.c" #include "recipe/os/BSD/NetBSD.c" #include "recipe/os/BSD/OpenBSD.c" + #include "recipe/ware/TeX-Live.c" #include "recipe/ware/emacs.c" #include "recipe/ware/WinGet.c" diff --git a/src/recipe/catalog.c b/src/recipe/catalog.c index cc3e750..ec487fa 100644 --- a/src/recipe/catalog.c +++ b/src/recipe/catalog.c @@ -8,9 +8,6 @@ * ------------------------------------------------------------*/ /* Begin Target Matrix */ -def_target_noget (pl_clojure); - - #define t(a) (const char*)(a) static const char *pl_ruby [] = {"gem", "ruby", "rubygem", "rb", "rubygems", "bundler", NULL, t(&pl_ruby_target)}, diff --git a/src/recipe/lang/Clojure.c b/src/recipe/lang/Clojure.c new file mode 100644 index 0000000..811a423 --- /dev/null +++ b/src/recipe/lang/Clojure.c @@ -0,0 +1,35 @@ +/** ------------------------------------------------------------ + * SPDX-License-Identifier: GPL-3.0-or-later + * ------------------------------------------------------------- + * File Authors : Aoran Zeng + * Contributors : Nil Null + * Created On : <2023-09-10> + * Last Modified : <2024-08-09> + * ------------------------------------------------------------*/ + +/** + * @time 2023-09-10 更新 + * @note 不太好换,且用户可能不多,我们暂时只给用户提供文档 + */ +static SourceInfo +pl_clojure_sources[] = { + {&Upstream, NULL}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/help/clojars/"}, + {&Ustc, "https://mirrors.ustc.edu.cn/help/clojars.html"} +}; +def_sources_n(pl_clojure); + + +void +pl_clojure_setsrc (char *option) +{ + SourceInfo source; + chsrc_yield_source (pl_clojure); + chsrc_confirm_source (&source); + + chsrc_note2 ("抱歉,Clojure换源较复杂,您可手动查阅并换源:"); + puts (source.url); + chsrc_say_lastly (&source, ChsrcTypeManual); +} + +def_target_noget (pl_clojure); diff --git a/src/recipe/lang/NuGet.c b/src/recipe/lang/NuGet.c index 32a0d9a..4ad2a53 100644 --- a/src/recipe/lang/NuGet.c +++ b/src/recipe/lang/NuGet.c @@ -1,3 +1,12 @@ +/** ------------------------------------------------------------ + * SPDX-License-Identifier: GPL-3.0-or-later + * ------------------------------------------------------------- + * File Authors : Aoran Zeng + * Contributors : Nil Null + * Created On : <2023-09-10> + * Last Modified : <2024-08-09> + * ------------------------------------------------------------*/ + /** * @time 2024-04-18 更新 * @note {