Qualify os family name

This commit is contained in:
Aoran Zeng
2024-08-17 09:52:10 +08:00
parent 0f97a00f68
commit 2753a4c3d7
22 changed files with 21 additions and 21 deletions

View File

@@ -0,0 +1,47 @@
/** ------------------------------------------------------------
* SPDX-License-Identifier: GPL-3.0-or-later
* -------------------------------------------------------------
* File Authors : Heng Guo <2085471348@qq.com>
* Contributors : Nil Null <nil@null.org>
* Created On : <2023-09-06>
* Last Modified : <2024-08-16>
*
* openKylin直接基于Linux内核开发属于和Debian、openSUSE、Fedora、Arch
* 同一级别的、根社区发布的系统
* -------------------------------------------------------------
/**
* @time 2023-09-29 更新
*/
static SourceInfo
os_openkylin_sources[] = {
{&Upstream, "https://archive.openkylin.top/openkylin/"},
{&Ali, "https://mirrors.aliyun.com/openkylin/"},
{&Netease, "https://mirrors.163.com/openkylin/"},
};
def_sources_n(os_openkylin);
void
os_openkylin_getsrc (char *option)
{
chsrc_view_file (OS_Apt_SourceList);
}
void
os_openkylin_setsrc (char *option)
{
chsrc_ensure_root();
SourceInfo source;
chsrc_yield_source (os_openkylin);
chsrc_confirm_source (&source);
chsrc_backup (OS_Apt_SourceList);
char *cmd = xy_strjoin (3, "sed -E -i 's@https?://.*/openkylin/?@", source.url, "@g'" OS_Apt_SourceList);
chsrc_run (cmd, RunOpt_Default);
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
chsrc_say_lastly (&source, ChsrcTypeUntested);
}
def_target(os_openkylin);