diff --git a/include/source.h b/include/source.h index e8148d1..4f9052c 100644 --- a/include/source.h +++ b/include/source.h @@ -357,23 +357,11 @@ os_alma_sources[] = { {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/almalinux"}, {&Zju, "https://mirrors.zju.edu.cn/almalinux"}, {&Nju, "https://mirror.nju.edu.cn/almalinux"}, - }, -/** - * @time 2023-09-29 更新 - */ -os_solus_sources[] = { - {&Upstream, 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"} -}, - - /** * @time 2023-09-29 更新 */ @@ -642,7 +630,6 @@ def_sources_n(os_kali); def_sources_n(os_opensuse); def_sources_n(os_arch); def_sources_n(os_archlinuxcn); def_sources_n(os_msys2); def_sources_n(os_gentoo); def_sources_n(os_rocky); def_sources_n(os_alma); -def_sources_n(os_solus); def_sources_n(os_trisquel); def_sources_n(os_linuxlite); def_sources_n(os_raspberrypi); def_sources_n(os_armbian); diff --git a/src/chsrc.c b/src/chsrc.c index 0ff7ee0..9e0b6fd 100644 --- a/src/chsrc.c +++ b/src/chsrc.c @@ -796,24 +796,7 @@ os_alma_setsrc (char *option) #include "recipe/os/alpine.c" #include "recipe/os/void.c" - - -/** - * 参考: https://help.mirrors.cernet.edu.cn/solus/ - */ -void -os_solus_setsrc (char *option) -{ - chsrc_ensure_root (); - - SourceInfo source; - chsrc_yield_source (os_solus); - chsrc_confirm_source (&source); - - char *cmd = xy_2strjoin ("eopkg add-repo Solus ", source.url); - chsrc_run (cmd, RunOpt_Default); - chsrc_say_lastly (&source, ChsrcTypeAuto); -} +#include "recipe/os/solus.c" diff --git a/src/recipe/catalog.c b/src/recipe/catalog.c index ac83252..3ead4ff 100644 --- a/src/recipe/catalog.c +++ b/src/recipe/catalog.c @@ -51,7 +51,6 @@ def_target_noget(os_opensuse); def_target_noget(os_gentoo); def_target_noget(os_rocky); def_target_noget(os_alma); -def_target_noget(os_solus); def_target_noget(os_freebsd); def_target_noget(os_openeuler); def_target_noget(os_anolis); diff --git a/src/recipe/os/alpine.c b/src/recipe/os/alpine.c index 303289f..2135e1b 100644 --- a/src/recipe/os/alpine.c +++ b/src/recipe/os/alpine.c @@ -4,7 +4,7 @@ * File Authors : Aoran Zeng * Contributors : Nil Null * Created On : <2023-09-24> - * Last Modified : <2024-08-09> + * Last Modified : <2024-08-16> * ------------------------------------------------------------*/ /** diff --git a/src/recipe/os/solus.c b/src/recipe/os/solus.c new file mode 100644 index 0000000..8ce41c5 --- /dev/null +++ b/src/recipe/os/solus.c @@ -0,0 +1,40 @@ +/** ------------------------------------------------------------ + * SPDX-License-Identifier: GPL-3.0-or-later + * ------------------------------------------------------------- + * File Authors : Aoran Zeng + * Contributors : Nil Null + * Created On : <2023-09-29> + * Last Modified : <2024-08-16> + * ------------------------------------------------------------*/ + +/** + * @time 2023-09-29 更新 + */ +static SourceInfo +os_solus_sources[] = { + {&Upstream, 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/ + */ +void +os_solus_setsrc (char *option) +{ + chsrc_ensure_root (); + + SourceInfo source; + chsrc_yield_source (os_solus); + chsrc_confirm_source (&source); + + char *cmd = xy_2strjoin ("eopkg add-repo Solus ", source.url); + chsrc_run (cmd, RunOpt_Default); + chsrc_say_lastly (&source, ChsrcTypeAuto); +} + +def_target_noget(os_solus); diff --git a/src/recipe/os/void.c b/src/recipe/os/void.c index 9759429..f30c2c0 100644 --- a/src/recipe/os/void.c +++ b/src/recipe/os/void.c @@ -4,7 +4,7 @@ * File Authors : Aoran Zeng * Contributors : Nil Null * Created On : <2023-09-24> - * Last Modified : <2024-08-09> + * Last Modified : <2024-08-16> * ------------------------------------------------------------*/ /**