mirror of
https://github.com/RubyMetric/chsrc
synced 2025-12-24 11:32:01 +08:00
Split linuxlite out
This commit is contained in:
29
src/chsrc.c
29
src/chsrc.c
@@ -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"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user