Only append once

[GitHub #76]
This commit is contained in:
Aoran Zeng
2024-11-22 01:42:01 +08:00
parent 505b14895e
commit c1c495cf6d
10 changed files with 48 additions and 57 deletions

View File

@@ -95,7 +95,7 @@ os_freebsd_setsrc (char *option)
// https://help.mirrors.cernet.edu.cn/FreeBSD-ports/
chsrc_backup ("/etc/make.conf");
char *ports = xy_strjoin (3, "MASTER_SITE_OVERRIDE?=http://", source.url, "/freebsd-ports/distfiles/${DIST_SUBDIR}/");
char *ports = xy_strjoin (3, "MASTER_SITE_OVERRIDE?=http://", source.url, "/freebsd-ports/distfiles/${DIST_SUBDIR}/\n");
chsrc_append_to_file (ports, "/etc/make.conf");

View File

@@ -4,7 +4,7 @@
* File Authors : Heng Guo <2085471348@qq.com>
* Contributors : Aoran Zeng <ccmywish@qq.com>
* Created On : <2023-09-05>
* Last Modified : <2024-09-14>
* Last Modified : <2024-11-22>
* ------------------------------------------------------------*/
/**
@@ -42,9 +42,9 @@ os_gentoo_setsrc (char *option)
"gentoo-portage#g");
chsrc_run (cmd, RunOpt_Default);
char *towrite = xy_strjoin (3, "GENTOO_MIRRORS=\"https://", source.url, "gentoo\"");
char *w = xy_strjoin (3, "GENTOO_MIRRORS=\"https://", source.url, "gentoo\"\n");
chsrc_append_to_file (towrite, "/etc/portage/make.conf");
chsrc_append_to_file (w, "/etc/portage/make.conf");
chsrc_conclude (&source, SetsrcType_Untested);
}