Split openkylin out

This commit is contained in:
Aoran Zeng 2024-08-16 03:39:18 +08:00
parent 0a65baecb0
commit 415d5d2092
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
5 changed files with 52 additions and 39 deletions

View File

@ -213,9 +213,9 @@ sudo chsrc set raspi 或 set raspberrypi
sudo chsrc set armbian sudo chsrc set armbian
sudo chsrc set openwrt sudo chsrc set openwrt
sudo chsrc set euler 或 set openeuler sudo chsrc set openeuler
sudo chsrc set anolis 或 set openanolis sudo chsrc set openanolis
sudo chsrc set kylin 或 set openkylin sudo chsrc set openkylin
sudo chsrc set deepin sudo chsrc set deepin
chsrc set msys2 或 set msys chsrc set msys2 或 set msys

View File

@ -181,20 +181,11 @@ os_anolis_sources[] = {
{&Upstream, NULL}, {&Upstream, NULL},
{&Ali, "https://mirrors.aliyun.com/anolis"}, {&Ali, "https://mirrors.aliyun.com/anolis"},
{&Hust, "https://mirrors.hust.edu.cn/anolis"} {&Hust, "https://mirrors.hust.edu.cn/anolis"}
},
/**
* @time 2023-09-29
*/
os_openkylin_sources[] = {
{&Upstream, "https://archive.openkylin.top/openkylin/"},
{&Ali, "https://mirrors.aliyun.com/openkylin/"},
{&Netease, "https://mirrors.163.com/openkylin/"},
}; };
/** /**
* @time 2024-06-07 * @time 2024-06-07
* @note * @note
@ -307,7 +298,6 @@ def_sources_n(pl_dotnet);
def_sources_n(os_msys2); def_sources_n(os_msys2);
def_sources_n(os_openkylin);
def_sources_n(os_anolis); def_sources_n(os_anolis);
def_sources_n(wr_winget); def_sources_n(wr_winget);

View File

@ -85,6 +85,7 @@ pl_clojure_setsrc (char *option)
#include "recipe/os/apt-family/Linux-Lite.c" #include "recipe/os/apt-family/Linux-Lite.c"
// Independent // Independent
#include "recipe/os/apt-family/ros.c" #include "recipe/os/apt-family/ros.c"
#include "recipe/os/apt-family/openKylin.c"
#include "recipe/os/apt-family/deepin.c" #include "recipe/os/apt-family/deepin.c"
@ -178,30 +179,6 @@ os_anolis_setsrc (char *option)
} }
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);
}
#include "recipe/os/freebsd.c" #include "recipe/os/freebsd.c"
#include "recipe/os/netbsd.c" #include "recipe/os/netbsd.c"
#include "recipe/os/openbsd.c" #include "recipe/os/openbsd.c"

View File

@ -39,7 +39,6 @@ static const char
}; };
def_target(os_openkylin);
def_target_noget(os_anolis); def_target_noget(os_anolis);
def_target_noget(os_msys2); def_target_noget(os_msys2);
TargetInfo os_manjaro_target = {NULL, os_manjaro_setsrc, NULL, NULL, 0}; TargetInfo os_manjaro_target = {NULL, os_manjaro_setsrc, NULL, NULL, 0};

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内核开发DebianopenSUSEFedoraArch
*
* -------------------------------------------------------------
/**
* @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);