mirror of
https://github.com/RubyMetric/chsrc
synced 2025-12-23 10:59:29 +08:00
Update inner macro
This commit is contained in:
@@ -27,7 +27,7 @@ pl_clojure_setsrc (char *option)
|
||||
|
||||
chsrc_note2 ("抱歉,Clojure换源较复杂,您可手动查阅并换源:");
|
||||
puts (source.url);
|
||||
chsrc_conclude (&source, ChsrcTypeManual);
|
||||
chsrc_conclude (&source, SetsrcType_Manual);
|
||||
}
|
||||
|
||||
def_target_s (pl_clojure);
|
||||
|
||||
@@ -82,7 +82,7 @@ pl_dart_flutter_setsrc (char *option)
|
||||
chsrc_append_to_file (towrite, bashrc);
|
||||
}
|
||||
}
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ pl_dart_setsrc (char *option)
|
||||
chsrc_append_to_file (towrite, bashrc);
|
||||
}
|
||||
}
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ pl_go_setsrc (char *option)
|
||||
|
||||
cmd = xy_strjoin (3, "go env -w GOPROXY=", source.url, ",direct");
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
def_target(pl_go);
|
||||
|
||||
@@ -62,7 +62,7 @@ pl_haskell_setsrc (char *option)
|
||||
|
||||
chsrc_note2 (xy_strjoin (3, "请向 ", config, " 中手动添加:"));
|
||||
puts (file);
|
||||
chsrc_conclude (&source, ChsrcTypeManual);
|
||||
chsrc_conclude (&source, SetsrcType_Manual);
|
||||
}
|
||||
|
||||
def_target_s (pl_haskell);
|
||||
|
||||
@@ -95,7 +95,7 @@ pl_java_setsrc (char *option)
|
||||
chsrc_note2 ("请在您的 build.gradle 中添加:");
|
||||
puts (file);
|
||||
}
|
||||
chsrc_conclude (&source, ChsrcTypeManual);
|
||||
chsrc_conclude (&source, SetsrcType_Manual);
|
||||
}
|
||||
|
||||
def_target(pl_java);
|
||||
|
||||
@@ -47,7 +47,7 @@ pl_julia_setsrc (char *option)
|
||||
const char *towrite = xy_strjoin (3, "ENV[\"JULIA_PKG_SERVER\"] = \"", source.url, "\"");
|
||||
|
||||
chsrc_append_to_file (towrite, "~/.julia/config/startup.jl");
|
||||
chsrc_conclude (&source, ChsrcTypeUntested);
|
||||
chsrc_conclude (&source, SetsrcType_Untested);
|
||||
}
|
||||
|
||||
def_target(pl_julia);
|
||||
|
||||
@@ -51,7 +51,7 @@ pl_lua_setsrc (char *option)
|
||||
chsrc_note2 ("请手动修改 ~/.luarocks/upload_config.lua 文件 (用于上传):");
|
||||
puts (upload_config);
|
||||
|
||||
chsrc_conclude (&source, ChsrcTypeManual);
|
||||
chsrc_conclude (&source, SetsrcType_Manual);
|
||||
}
|
||||
|
||||
def_target(pl_lua);
|
||||
|
||||
@@ -26,7 +26,7 @@ pl_nodejs_bun_getsrc (char *option)
|
||||
void
|
||||
pl_nodejs_bun_setsrc (char *option)
|
||||
{
|
||||
char *chsrc_type = xy_streql (option, ChsrcTypeReset) ? ChsrcTypeReset : ChsrcTypeManual;
|
||||
char *chsrc_type = xy_streql (option, SetsrcType_Reset) ? SetsrcType_Reset : SetsrcType_Manual;
|
||||
chsrc_yield_source (pl_nodejs);
|
||||
|
||||
char *file = xy_strjoin(3, "[install]\n"
|
||||
@@ -45,7 +45,7 @@ pl_nodejs_bun_setsrc (char *option)
|
||||
void
|
||||
pl_nodejs_bun_resetsrc (char *option)
|
||||
{
|
||||
pl_nodejs_bun_setsrc (ChsrcTypeReset);
|
||||
pl_nodejs_bun_setsrc (SetsrcType_Reset);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ pl_nodejs_setsrc (char *option)
|
||||
pl_nodejs_pnpm_setsrc (option);
|
||||
}
|
||||
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ pl_nodejs_setsrc (char *option)
|
||||
void
|
||||
pl_nodejs_resetsrc (char *option)
|
||||
{
|
||||
pl_nodejs_setsrc (ChsrcTypeReset);
|
||||
pl_nodejs_setsrc (SetsrcType_Reset);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ void
|
||||
pl_nodejs_yarn_setsrc (char *option)
|
||||
{
|
||||
SourceInfo source;
|
||||
chsrc_yield_the_source (pl_nodejs);
|
||||
chsrc_yield_for_the_source (pl_nodejs);
|
||||
if (ProgMode_Target_Group!=true)
|
||||
chsrc_confirm_source;
|
||||
|
||||
@@ -72,7 +72,7 @@ pl_nodejs_yarn_setsrc (char *option)
|
||||
}
|
||||
|
||||
if (ProgMode_Target_Group!=true)
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ pl_nodejs_yarn_setsrc (char *option)
|
||||
void
|
||||
pl_nodejs_yarn_resetsrc (char *option)
|
||||
{
|
||||
pl_nodejs_yarn_setsrc (ChsrcTypeReset);
|
||||
pl_nodejs_yarn_setsrc (SetsrcType_Reset);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ void
|
||||
pl_nodejs_npm_setsrc (char *option)
|
||||
{
|
||||
SourceInfo source;
|
||||
chsrc_yield_the_source (pl_nodejs);
|
||||
chsrc_yield_for_the_source (pl_nodejs);
|
||||
if (ProgMode_Target_Group!=true)
|
||||
chsrc_confirm_source;
|
||||
|
||||
@@ -41,7 +41,7 @@ pl_nodejs_npm_setsrc (char *option)
|
||||
chsrc_run (cmd, RunOpt_No_Last_New_Line);
|
||||
|
||||
if (ProgMode_Target_Group!=true)
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ pl_nodejs_npm_setsrc (char *option)
|
||||
void
|
||||
pl_nodejs_npm_resetsrc (char *option)
|
||||
{
|
||||
pl_nodejs_npm_setsrc (ChsrcTypeReset);
|
||||
pl_nodejs_npm_setsrc (SetsrcType_Reset);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ pl_nodejs_nvm_setsrc (char *option)
|
||||
if (xy_file_exist (zshrc))
|
||||
chsrc_append_to_file (env, zshrc);
|
||||
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ pl_nodejs_nvm_setsrc (char *option)
|
||||
void
|
||||
pl_nodejs_nvm_resetsrc (char *option)
|
||||
{
|
||||
// pl_nodejs_nvm_setsrc (ChsrcTypeReset);
|
||||
// pl_nodejs_nvm_setsrc (SetsrcType_Reset);
|
||||
chsrc_error ("暂不支持对 nvm 重置");
|
||||
exit (Exit_Unsupported);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ void
|
||||
pl_nodejs_pnpm_setsrc (char *option)
|
||||
{
|
||||
SourceInfo source;
|
||||
chsrc_yield_the_source (pl_nodejs);
|
||||
chsrc_yield_for_the_source (pl_nodejs);
|
||||
if (ProgMode_Target_Group!=true)
|
||||
chsrc_confirm_source;
|
||||
|
||||
@@ -42,7 +42,7 @@ pl_nodejs_pnpm_setsrc (char *option)
|
||||
chsrc_run (cmd, RunOpt_No_Last_New_Line);
|
||||
|
||||
if (ProgMode_Target_Group!=true)
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ pl_nodejs_pnpm_setsrc (char *option)
|
||||
void
|
||||
pl_nodejs_pnpm_resetsrc (char *option)
|
||||
{
|
||||
pl_nodejs_pnpm_setsrc (ChsrcTypeReset);
|
||||
pl_nodejs_pnpm_setsrc (SetsrcType_Reset);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ pl_ocaml_setsrc(char *option)
|
||||
chsrc_note2 ("如果是首次使用 opam ,请使用以下命令进行初始化");
|
||||
puts (xy_2strjoin ("opam init default ", source.url));
|
||||
|
||||
chsrc_conclude (&source, ChsrcTypeSemiAuto);
|
||||
chsrc_conclude (&source, SetsrcType_SemiAuto);
|
||||
}
|
||||
|
||||
def_target(pl_ocaml);
|
||||
|
||||
@@ -57,7 +57,7 @@ pl_php_setsrc (char *option)
|
||||
char *cmd = xy_strjoin (4, "composer config", where, "repo.packagist composer ", source.url);
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
|
||||
chsrc_conclude (&source, ChsrcTypeSemiAuto);
|
||||
chsrc_conclude (&source, SetsrcType_SemiAuto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ pl_perl_setsrc (char *option)
|
||||
|
||||
chsrc_note2 ("请您使用 perl -v 以及 cpan -v,若 Perl >= v5.36 或 CPAN >= 2.29,请额外手动调用下面的命令");
|
||||
puts ("perl -MCPAN -e \"CPAN::HandleConfig->load(); CPAN::HandleConfig->edit('pushy_https', 0);; CPAN::HandleConfig->commit()\"");
|
||||
chsrc_conclude (&source, ChsrcTypeSemiAuto);
|
||||
chsrc_conclude (&source, SetsrcType_SemiAuto);
|
||||
}
|
||||
|
||||
def_target(pl_perl);
|
||||
|
||||
@@ -29,7 +29,7 @@ void
|
||||
pl_python_pdm_setsrc (char *option)
|
||||
{
|
||||
SourceInfo source;
|
||||
chsrc_yield_the_source (pl_python);
|
||||
chsrc_yield_for_the_source (pl_python);
|
||||
if (ProgMode_Target_Group!=true)
|
||||
chsrc_confirm_source;
|
||||
|
||||
@@ -43,7 +43,7 @@ pl_python_pdm_setsrc (char *option)
|
||||
chsrc_run (cmd, RunOpt_No_Last_New_Line);
|
||||
|
||||
if (ProgMode_Target_Group!=true)
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ pl_python_pdm_setsrc (char *option)
|
||||
void
|
||||
pl_python_pdm_resetsrc (char *option)
|
||||
{
|
||||
pl_python_pdm_setsrc (ChsrcTypeReset);
|
||||
pl_python_pdm_setsrc (SetsrcType_Reset);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ void
|
||||
pl_python_poetry_setsrc (char *option)
|
||||
{
|
||||
SourceInfo source;
|
||||
chsrc_yield_the_source (pl_python);
|
||||
chsrc_yield_for_the_source (pl_python);
|
||||
if (ProgMode_Target_Group!=true)
|
||||
chsrc_confirm_source;
|
||||
|
||||
@@ -41,7 +41,7 @@ pl_python_poetry_setsrc (char *option)
|
||||
chsrc_run (cmd, RunOpt_No_Last_New_Line);
|
||||
|
||||
if (ProgMode_Target_Group!=true)
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ pl_python_poetry_setsrc (char *option)
|
||||
void
|
||||
pl_python_poetry_resetsrc (char *option)
|
||||
{
|
||||
pl_python_poetry_setsrc (ChsrcTypeReset);
|
||||
pl_python_poetry_setsrc (SetsrcType_Reset);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ pl_python_setsrc (char *option)
|
||||
chsrc_note2 (msg);
|
||||
}
|
||||
|
||||
char *chsrc_type = xy_streql (option, ChsrcTypeReset) ? ChsrcTypeReset : ChsrcTypeAuto;
|
||||
char *chsrc_type = xy_streql (option, SetsrcType_Reset) ? SetsrcType_Reset : SetsrcType_Auto;
|
||||
|
||||
bool pdm_exist = false,
|
||||
poetry_exist = false;
|
||||
@@ -77,7 +77,7 @@ pl_python_setsrc (char *option)
|
||||
void
|
||||
pl_python_resetsrc (char *option)
|
||||
{
|
||||
pl_python_setsrc (ChsrcTypeReset);
|
||||
pl_python_setsrc (SetsrcType_Reset);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ pl_python_pip_setsrc (char *option)
|
||||
}
|
||||
|
||||
SourceInfo source;
|
||||
chsrc_yield_the_source (pl_python);
|
||||
chsrc_yield_for_the_source (pl_python);
|
||||
if (ProgMode_Target_Group!=true)
|
||||
chsrc_confirm_source;
|
||||
|
||||
@@ -53,7 +53,7 @@ pl_python_pip_setsrc (char *option)
|
||||
chsrc_run (cmd, RunOpt_No_Last_New_Line);
|
||||
|
||||
if (ProgMode_Target_Group!=true)
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ pl_python_pip_setsrc (char *option)
|
||||
void
|
||||
pl_python_pip_resetsrc (char *option)
|
||||
{
|
||||
pl_python_pip_setsrc (ChsrcTypeReset);
|
||||
pl_python_pip_setsrc (SetsrcType_Reset);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ pl_r_setsrc (char *option)
|
||||
chsrc_append_to_file (towrite1, "~/.Rprofile");
|
||||
chsrc_append_to_file (towrite2, "~/.Rprofile");
|
||||
}
|
||||
chsrc_conclude (&source, ChsrcTypeAuto);
|
||||
chsrc_conclude (&source, SetsrcType_Auto);
|
||||
}
|
||||
|
||||
def_target(pl_r);
|
||||
|
||||
@@ -60,7 +60,7 @@ pl_ruby_remove_gem_source (const char *source)
|
||||
void
|
||||
pl_ruby_setsrc (char *option)
|
||||
{
|
||||
char *chsrc_type = xy_streql (option, ChsrcTypeReset) ? ChsrcTypeReset : ChsrcTypeAuto;
|
||||
char *chsrc_type = xy_streql (option, SetsrcType_Reset) ? SetsrcType_Reset : SetsrcType_Auto;
|
||||
|
||||
chsrc_ensure_program ("gem");
|
||||
|
||||
@@ -91,7 +91,7 @@ pl_ruby_setsrc (char *option)
|
||||
void
|
||||
pl_ruby_resetsrc (char *option)
|
||||
{
|
||||
pl_ruby_setsrc (ChsrcTypeReset);
|
||||
pl_ruby_setsrc (SetsrcType_Reset);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ pl_rust_setsrc (char *option)
|
||||
|
||||
chsrc_note2 (xy_strjoin (3, "请您手动写入以下内容到 ", xy_uniform_path ("~/.cargo/config.toml"), " 文件中:"));
|
||||
puts (file);
|
||||
chsrc_conclude (&source, ChsrcTypeManual);
|
||||
chsrc_conclude (&source, SetsrcType_Manual);
|
||||
}
|
||||
|
||||
def_target(pl_rust);
|
||||
|
||||
Reference in New Issue
Block a user