Split linuxlite out

This commit is contained in:
Aoran Zeng 2024-08-16 03:19:31 +08:00
parent d3c8f7fdfe
commit 1c37cfa311
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
4 changed files with 48 additions and 41 deletions

View File

@ -173,16 +173,6 @@ os_msys2_sources[] = {
/**
* @time 2023-09-29
*/
os_linuxlite_sources[] = {
{&Upstream, NULL},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/linuxliteos/"}
},
/**
* @time 2023-09-06
@ -333,8 +323,6 @@ def_sources_n(pl_dotnet);
def_sources_n(os_msys2);
def_sources_n(os_linuxlite);
def_sources_n(os_openeuler); def_sources_n(os_openkylin);
def_sources_n(os_anolis);

View File

@ -82,6 +82,7 @@ pl_clojure_setsrc (char *option)
// Ubuntu-based
#include "recipe/os/apt-family/linuxmint.c"
#include "recipe/os/apt-family/trisquel.c"
#include "recipe/os/apt-family/Linux-Lite.c"
// Independent
#include "recipe/os/apt-family/ros.c"
#include "recipe/os/apt-family/deepin.c"
@ -150,34 +151,6 @@ os_manjaro_setsrc (char *option)
void
os_linuxlite_getsrc (char *option)
{
chsrc_view_file (OS_Apt_SourceList);
}
/**
* : https://help.mirrors.cernet.edu.cn/linuxliteos/
*/
void
os_linuxlite_setsrc (char *option)
{
chsrc_ensure_root ();
SourceInfo source;
chsrc_yield_source (os_linuxlite);
chsrc_confirm_source (&source);
chsrc_backup (OS_Apt_SourceList);
char *cmd = xy_strjoin (3, "sed -E -i 's@https?://.*/.*/?@", source.url, "@g' /etc/apt/sources.list");
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
chsrc_say_lastly (&source, ChsrcTypeAuto);
}
#include "recipe/os/openwrt.c"

View File

@ -39,7 +39,6 @@ static const char
};
def_target(os_linuxlite);
def_target(os_openkylin);
def_target_noget(os_openeuler);
def_target_noget(os_anolis);

View File

@ -0,0 +1,47 @@
/** ------------------------------------------------------------
* SPDX-License-Identifier: GPL-3.0-or-later
* -------------------------------------------------------------
* File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Nil Null <nil@null.org>
* Created On : <2023-09-29>
* Last Modified : <2024-08-16>
* ------------------------------------------------------------*/
/**
* @time 2023-09-29
*/
static SourceInfo
os_linuxlite_sources[] = {
{&Upstream, NULL},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/linuxliteos/"}
};
def_sources_n(os_linuxlite);
void
os_linuxlite_getsrc (char *option)
{
chsrc_view_file (OS_Apt_SourceList);
}
/**
* : https://help.mirrors.cernet.edu.cn/linuxliteos/
*/
void
os_linuxlite_setsrc (char *option)
{
chsrc_ensure_root ();
SourceInfo source;
chsrc_yield_source (os_linuxlite);
chsrc_confirm_source (&source);
chsrc_backup (OS_Apt_SourceList);
char *cmd = xy_strjoin (3, "sed -E -i 's@https?://.*/.*/?@", source.url, "@g' " OS_Apt_SourceList);
chsrc_run ("apt update", RunOpt_No_Last_New_Line);
chsrc_say_lastly (&source, ChsrcTypeAuto);
}
def_target(os_linuxlite);