Split gentoo out

This commit is contained in:
Aoran Zeng
2024-08-16 01:04:07 +08:00
parent 8fc2fb050b
commit 49c5c0163d
4 changed files with 55 additions and 42 deletions

View File

@@ -723,32 +723,8 @@ os_archlinuxcn_setsrc (char *option)
}
#undef OS_Pacman_MirrorList
/**
* HELP: 未经测试
*/
void
os_gentoo_setsrc (char *option)
{
chsrc_ensure_root ();
SourceInfo source;
chsrc_yield_source (os_gentoo);
chsrc_confirm_source (&source);
chsrc_backup ("/etc/portage/repos.conf/gentoo.conf");
char *cmd = xy_strjoin (3, "sed -i \"s#rsync://.*/gentoo-portage#rsync://",
source.url,
"gentoo-portage#g");
chsrc_run (cmd, RunOpt_Default);
char *towrite = xy_strjoin (3, "GENTOO_MIRRORS=\"https://", source.url, "gentoo\"");
chsrc_append_to_file (towrite, "/etc/portage/make.conf");
chsrc_say_lastly (&source, ChsrcTypeUntested);
}
#include "recipe/os/gentoo.c"
/**
* 参考: https://help.mirrors.cernet.edu.cn/rocky/