mirror of
https://github.com/RubyMetric/chsrc
synced 2025-07-19 06:09:37 +08:00
Update macro
This commit is contained in:
parent
a71a39230b
commit
d0b0cdaae7
@ -1033,7 +1033,7 @@ source_has_empty_url (Source_t *source)
|
|||||||
* 1. 告知用户选择了什么源和镜像
|
* 1. 告知用户选择了什么源和镜像
|
||||||
* 2. 对选择的源和镜像站进行一定的校验
|
* 2. 对选择的源和镜像站进行一定的校验
|
||||||
*/
|
*/
|
||||||
#define chsrc_confirm_source confirm_source(&source)
|
#define chsrc_confirm_source() confirm_source(&source)
|
||||||
void
|
void
|
||||||
confirm_source (Source_t *source)
|
confirm_source (Source_t *source)
|
||||||
{
|
{
|
||||||
@ -1063,7 +1063,7 @@ confirm_source (Source_t *source)
|
|||||||
hr();
|
hr();
|
||||||
}
|
}
|
||||||
|
|
||||||
#define chsrc_yield_source_and_confirm(for_what) chsrc_yield_source(for_what);chsrc_confirm_source
|
#define chsrc_yield_source_and_confirm(for_what) chsrc_yield_source(for_what);chsrc_confirm_source()
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -42,7 +42,7 @@ pl_nodejs_yarn_setsrc (char *option)
|
|||||||
{
|
{
|
||||||
chsrc_yield_source (pl_nodejs_group);
|
chsrc_yield_source (pl_nodejs_group);
|
||||||
if (chsrc_in_standalone_mode())
|
if (chsrc_in_standalone_mode())
|
||||||
chsrc_confirm_source;
|
chsrc_confirm_source();
|
||||||
|
|
||||||
char *cmd = NULL;
|
char *cmd = NULL;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ pl_nodejs_npm_setsrc (char *option)
|
|||||||
{
|
{
|
||||||
chsrc_yield_source (pl_nodejs_group);
|
chsrc_yield_source (pl_nodejs_group);
|
||||||
if (chsrc_in_standalone_mode())
|
if (chsrc_in_standalone_mode())
|
||||||
chsrc_confirm_source;
|
chsrc_confirm_source();
|
||||||
|
|
||||||
char *cmd = NULL;
|
char *cmd = NULL;
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ pl_nodejs_pnpm_setsrc (char *option)
|
|||||||
{
|
{
|
||||||
chsrc_yield_source (pl_nodejs_group);
|
chsrc_yield_source (pl_nodejs_group);
|
||||||
if (chsrc_in_standalone_mode())
|
if (chsrc_in_standalone_mode())
|
||||||
chsrc_confirm_source;
|
chsrc_confirm_source();
|
||||||
|
|
||||||
char *cmd = NULL;
|
char *cmd = NULL;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ pl_python_pdm_setsrc (char *option)
|
|||||||
{
|
{
|
||||||
chsrc_yield_source (pl_python_group);
|
chsrc_yield_source (pl_python_group);
|
||||||
if (chsrc_in_standalone_mode())
|
if (chsrc_in_standalone_mode())
|
||||||
chsrc_confirm_source;
|
chsrc_confirm_source();
|
||||||
|
|
||||||
char *cmd = NULL;
|
char *cmd = NULL;
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ pl_python_poetry_setsrc (char *option)
|
|||||||
{
|
{
|
||||||
chsrc_yield_source (pl_python_group);
|
chsrc_yield_source (pl_python_group);
|
||||||
if (chsrc_in_standalone_mode())
|
if (chsrc_in_standalone_mode())
|
||||||
chsrc_confirm_source;
|
chsrc_confirm_source();
|
||||||
|
|
||||||
char *cmd = NULL;
|
char *cmd = NULL;
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ pl_python_pip_setsrc (char *option)
|
|||||||
|
|
||||||
chsrc_yield_source (pl_python_group);
|
chsrc_yield_source (pl_python_group);
|
||||||
if (chsrc_in_standalone_mode())
|
if (chsrc_in_standalone_mode())
|
||||||
chsrc_confirm_source;
|
chsrc_confirm_source();
|
||||||
|
|
||||||
char *py_prog_name = NULL;
|
char *py_prog_name = NULL;
|
||||||
pl_python_get_py_program_name (&py_prog_name);
|
pl_python_get_py_program_name (&py_prog_name);
|
||||||
|
@ -98,7 +98,7 @@ pl_python_uv_setsrc (char *option)
|
|||||||
|
|
||||||
chsrc_yield_source (pl_python_group);
|
chsrc_yield_source (pl_python_group);
|
||||||
if (chsrc_in_standalone_mode())
|
if (chsrc_in_standalone_mode())
|
||||||
chsrc_confirm_source;
|
chsrc_confirm_source();
|
||||||
|
|
||||||
char *uv_config = pl_python_find_uv_config (true);
|
char *uv_config = pl_python_find_uv_config (true);
|
||||||
if (NULL==uv_config)
|
if (NULL==uv_config)
|
||||||
|
@ -42,7 +42,7 @@ os_freebsd_setsrc (char *option)
|
|||||||
int index = use_specific_mirror_or_auto_select (option, os_freebsd);
|
int index = use_specific_mirror_or_auto_select (option, os_freebsd);
|
||||||
|
|
||||||
Source_t source = os_freebsd_sources[index];
|
Source_t source = os_freebsd_sources[index];
|
||||||
chsrc_confirm_source;
|
chsrc_confirm_source();
|
||||||
|
|
||||||
chsrc_log2 ("1. 添加 freebsd-pkg 源 (二进制安装包)");
|
chsrc_log2 ("1. 添加 freebsd-pkg 源 (二进制安装包)");
|
||||||
chsrc_ensure_dir ("/usr/local/etc/pkg/repos");
|
chsrc_ensure_dir ("/usr/local/etc/pkg/repos");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user