mirror of
https://github.com/RubyMetric/chsrc
synced 2025-12-25 11:59:54 +08:00
Rename inner function
This commit is contained in:
@@ -42,7 +42,7 @@ os_freebsd_setsrc (char *option)
|
||||
int index = use_specific_mirror_or_auto_select (option, os_freebsd);
|
||||
|
||||
SourceInfo source = os_freebsd_sources[index];
|
||||
chsrc_confirm_source (&source);
|
||||
chsrc_confirm_source;
|
||||
|
||||
chsrc_log2 ("1. 添加 freebsd-pkg 源 (二进制安装包)");
|
||||
chsrc_ensure_dir ("/usr/local/etc/pkg/repos");
|
||||
@@ -128,7 +128,7 @@ os_freebsd_setsrc (char *option)
|
||||
chsrc_overwrite_file (update, "/etc/freebsd-update.conf");
|
||||
*/
|
||||
|
||||
chsrc_say_lastly (&source, ChsrcTypeSemiAuto);
|
||||
chsrc_conclude (&source, ChsrcTypeSemiAuto);
|
||||
}
|
||||
|
||||
def_target_s(os_freebsd);
|
||||
|
||||
@@ -46,9 +46,7 @@ os_netbsd_setsrc (char *option)
|
||||
{
|
||||
chsrc_ensure_root (); // HELP: 不知道是否需要确保root权限
|
||||
|
||||
SourceInfo source;
|
||||
chsrc_yield_source (os_netbsd);
|
||||
chsrc_confirm_source (&source);
|
||||
chsrc_yield_source_and_confirm (os_netbsd);
|
||||
|
||||
chsrc_backup ("/usr/pkg/etc/pkgin/repositories.conf");
|
||||
|
||||
@@ -59,7 +57,7 @@ os_netbsd_setsrc (char *option)
|
||||
char *url = xy_strjoin (5, source.url, arch, "/", version, "/All");
|
||||
chsrc_overwrite_file (url, "/usr/pkg/etc/pkgin/repositories.conf");
|
||||
|
||||
chsrc_say_lastly (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
}
|
||||
|
||||
def_target(os_netbsd);
|
||||
|
||||
@@ -41,14 +41,12 @@ os_openbsd_setsrc (char *option)
|
||||
{
|
||||
chsrc_ensure_root ();
|
||||
|
||||
SourceInfo source;
|
||||
chsrc_yield_source (os_openbsd);
|
||||
chsrc_confirm_source (&source);
|
||||
chsrc_yield_source_and_confirm (os_openbsd);
|
||||
|
||||
chsrc_backup ("/etc/installurl");
|
||||
chsrc_overwrite_file (source.url, "/etc/installurl");
|
||||
|
||||
chsrc_say_lastly (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
}
|
||||
|
||||
def_target(os_openbsd);
|
||||
|
||||
Reference in New Issue
Block a user