diff --git a/src/chsrc-framework.h b/src/chsrc-framework.h index 9a206e0..5b74983 100644 --- a/src/chsrc-framework.h +++ b/src/chsrc-framework.h @@ -701,13 +701,13 @@ source_has_empty_url (SourceInfo *source) * 1. 用户指定某个 MirrorCode * 2. NULL: 用户什么都没指定 (将测速选择最快镜像) * 3. 用户给了一个 URL - * 4. ChsrcTypeReset + * 4. SetsrcType_Reset * 选用了Leader target * 5. ProgMode_Leader_Selected_Index 将给出所选索引 * * @dependency 变量 option */ -#define chsrc_yield_the_source(for_what) \ +#define chsrc_yield_for_the_source(for_what) \ if (ProgMode_Target_Group==true && ProgMode_Leader_Selected_Index==-1) \ { \ ProgMode_Leader_Selected_Index = use_specific_mirror_or_auto_select (option, for_what); \ @@ -730,7 +730,7 @@ source_has_empty_url (SourceInfo *source) #define chsrc_yield_source(for_what) \ SourceInfo source; \ - chsrc_yield_the_source(for_what) + chsrc_yield_for_the_source(for_what) @@ -778,11 +778,11 @@ confirm_source (SourceInfo *source) #define chsrc_yield_source_and_confirm(for_what) chsrc_yield_source(for_what);chsrc_confirm_source -#define ChsrcTypeAuto "auto" -#define ChsrcTypeReset "reset" -#define ChsrcTypeSemiAuto "semiauto" -#define ChsrcTypeManual "manual" -#define ChsrcTypeUntested "untested" +#define SetsrcType_Auto "auto" +#define SetsrcType_Reset "reset" +#define SetsrcType_SemiAuto "semiauto" +#define SetsrcType_Manual "manual" +#define SetsrcType_Untested "untested" #define MSG_EN_PUBLIC_URL "If the URL you specify is a public service, you are invited to contribute: chsrc issue" #define MSG_CN_PUBLIC_URL "若您指定的URL为公有服务,邀您参与贡献: chsrc issue" @@ -809,7 +809,7 @@ confirm_source (SourceInfo *source) /** * @param source 可为NULL - * @param last_word 5种选择:ChsrcTypeAuto | ChsrcTypeReset | ChsrcTypeSemiAuto | ChsrcTypeManual | ChsrcTypeUntested + * @param last_word 5种选择:SetsrcType_Auto | SetsrcType_Reset | SetsrcType_SemiAuto | SetsrcType_Manual | SetsrcType_Untested * @translation Done */ void @@ -817,7 +817,7 @@ chsrc_conclude (SourceInfo *source, const char *last_word) { split_between_source_changing_process; - if (xy_streql (ChsrcTypeAuto, last_word)) + if (xy_streql (SetsrcType_Auto, last_word)) { if (source) { @@ -840,13 +840,13 @@ chsrc_conclude (SourceInfo *source, const char *last_word) chsrc_log (msg); } } - else if (xy_streql (ChsrcTypeReset, last_word)) + else if (xy_streql (SetsrcType_Reset, last_word)) { // source_is_upstream (source) char *msg = CliOpt_InEnglish ? "Has been reset to the upstream default source" : "已重置为上游默认源"; chsrc_log (purple (msg)); } - else if (xy_streql (ChsrcTypeSemiAuto, last_word)) + else if (xy_streql (SetsrcType_SemiAuto, last_word)) { if (source) { @@ -873,7 +873,7 @@ chsrc_conclude (SourceInfo *source, const char *last_word) char *msg = CliOpt_InEnglish ? MSG_EN_BETTER : MSG_CN_BETTER; chsrc_warn (msg); } - else if (xy_streql (ChsrcTypeManual, last_word)) + else if (xy_streql (SetsrcType_Manual, last_word)) { if (source) { @@ -898,7 +898,7 @@ chsrc_conclude (SourceInfo *source, const char *last_word) char *msg = CliOpt_InEnglish ? MSG_EN_BETTER : MSG_CN_BETTER; chsrc_warn (msg); } - else if (xy_streql (ChsrcTypeUntested, last_word)) + else if (xy_streql (SetsrcType_Untested, last_word)) { if (source) { diff --git a/src/recipe/lang/Clojure.c b/src/recipe/lang/Clojure.c index 550d642..d183448 100644 --- a/src/recipe/lang/Clojure.c +++ b/src/recipe/lang/Clojure.c @@ -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); diff --git a/src/recipe/lang/Dart/Flutter.c b/src/recipe/lang/Dart/Flutter.c index 19081c4..1f0d5b0 100644 --- a/src/recipe/lang/Dart/Flutter.c +++ b/src/recipe/lang/Dart/Flutter.c @@ -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); } diff --git a/src/recipe/lang/Dart/Pub.c b/src/recipe/lang/Dart/Pub.c index cf8a66a..4836ce9 100644 --- a/src/recipe/lang/Dart/Pub.c +++ b/src/recipe/lang/Dart/Pub.c @@ -78,7 +78,7 @@ pl_dart_setsrc (char *option) chsrc_append_to_file (towrite, bashrc); } } - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); } diff --git a/src/recipe/lang/Go.c b/src/recipe/lang/Go.c index d7658c5..66ecac9 100644 --- a/src/recipe/lang/Go.c +++ b/src/recipe/lang/Go.c @@ -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); diff --git a/src/recipe/lang/Haskell.c b/src/recipe/lang/Haskell.c index bb4df8d..f5231d7 100644 --- a/src/recipe/lang/Haskell.c +++ b/src/recipe/lang/Haskell.c @@ -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); diff --git a/src/recipe/lang/Java.c b/src/recipe/lang/Java.c index 33cbffa..01a7b94 100644 --- a/src/recipe/lang/Java.c +++ b/src/recipe/lang/Java.c @@ -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); diff --git a/src/recipe/lang/Julia.c b/src/recipe/lang/Julia.c index de31939..0aaf623 100644 --- a/src/recipe/lang/Julia.c +++ b/src/recipe/lang/Julia.c @@ -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); diff --git a/src/recipe/lang/Lua.c b/src/recipe/lang/Lua.c index 7d997c0..97fa84d 100644 --- a/src/recipe/lang/Lua.c +++ b/src/recipe/lang/Lua.c @@ -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); diff --git a/src/recipe/lang/Node.js/Bun.c b/src/recipe/lang/Node.js/Bun.c index d3e4219..8162c39 100644 --- a/src/recipe/lang/Node.js/Bun.c +++ b/src/recipe/lang/Node.js/Bun.c @@ -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); } diff --git a/src/recipe/lang/Node.js/Node.js.c b/src/recipe/lang/Node.js/Node.js.c index df3f6fd..ac469cd 100644 --- a/src/recipe/lang/Node.js/Node.js.c +++ b/src/recipe/lang/Node.js/Node.js.c @@ -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); } diff --git a/src/recipe/lang/Node.js/Yarn.c b/src/recipe/lang/Node.js/Yarn.c index 6e57774..49c6249 100644 --- a/src/recipe/lang/Node.js/Yarn.c +++ b/src/recipe/lang/Node.js/Yarn.c @@ -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); } diff --git a/src/recipe/lang/Node.js/npm.c b/src/recipe/lang/Node.js/npm.c index 463568f..3ffcc14 100644 --- a/src/recipe/lang/Node.js/npm.c +++ b/src/recipe/lang/Node.js/npm.c @@ -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); } diff --git a/src/recipe/lang/Node.js/nvm.c b/src/recipe/lang/Node.js/nvm.c index 5a8d101..fc3959f 100644 --- a/src/recipe/lang/Node.js/nvm.c +++ b/src/recipe/lang/Node.js/nvm.c @@ -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); } diff --git a/src/recipe/lang/Node.js/pnpm.c b/src/recipe/lang/Node.js/pnpm.c index 2ff23f0..4a6401c 100644 --- a/src/recipe/lang/Node.js/pnpm.c +++ b/src/recipe/lang/Node.js/pnpm.c @@ -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); } diff --git a/src/recipe/lang/OCaml.c b/src/recipe/lang/OCaml.c index e9c1a51..48345f5 100644 --- a/src/recipe/lang/OCaml.c +++ b/src/recipe/lang/OCaml.c @@ -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); diff --git a/src/recipe/lang/PHP.c b/src/recipe/lang/PHP.c index b94df23..f5b30ec 100644 --- a/src/recipe/lang/PHP.c +++ b/src/recipe/lang/PHP.c @@ -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); } diff --git a/src/recipe/lang/Perl.c b/src/recipe/lang/Perl.c index 2f51f87..c724303 100644 --- a/src/recipe/lang/Perl.c +++ b/src/recipe/lang/Perl.c @@ -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); diff --git a/src/recipe/lang/Python/PDM.c b/src/recipe/lang/Python/PDM.c index c87b4a3..6df25cb 100644 --- a/src/recipe/lang/Python/PDM.c +++ b/src/recipe/lang/Python/PDM.c @@ -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); } diff --git a/src/recipe/lang/Python/Poetry.c b/src/recipe/lang/Python/Poetry.c index 9e5be5f..f54b0f0 100644 --- a/src/recipe/lang/Python/Poetry.c +++ b/src/recipe/lang/Python/Poetry.c @@ -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); } diff --git a/src/recipe/lang/Python/Python.c b/src/recipe/lang/Python/Python.c index f6e68cd..e412258 100644 --- a/src/recipe/lang/Python/Python.c +++ b/src/recipe/lang/Python/Python.c @@ -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); } diff --git a/src/recipe/lang/Python/pip.c b/src/recipe/lang/Python/pip.c index b2efe11..4512ba2 100644 --- a/src/recipe/lang/Python/pip.c +++ b/src/recipe/lang/Python/pip.c @@ -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); } diff --git a/src/recipe/lang/R.c b/src/recipe/lang/R.c index fa5f881..7075f86 100644 --- a/src/recipe/lang/R.c +++ b/src/recipe/lang/R.c @@ -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); diff --git a/src/recipe/lang/Ruby.c b/src/recipe/lang/Ruby.c index 065bf64..fa01332 100644 --- a/src/recipe/lang/Ruby.c +++ b/src/recipe/lang/Ruby.c @@ -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); } diff --git a/src/recipe/lang/Rust.c b/src/recipe/lang/Rust.c index b7b54fa..b65c98c 100644 --- a/src/recipe/lang/Rust.c +++ b/src/recipe/lang/Rust.c @@ -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); diff --git a/src/recipe/os/APT/Armbian.c b/src/recipe/os/APT/Armbian.c index 0b9b345..73f341d 100644 --- a/src/recipe/os/APT/Armbian.c +++ b/src/recipe/os/APT/Armbian.c @@ -54,7 +54,7 @@ os_armbian_setsrc (char *option) chsrc_run (cmd, RunOpt_Default); chsrc_run ("apt update", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); } diff --git a/src/recipe/os/APT/Debian.c b/src/recipe/os/APT/Debian.c index cdb2a2c..1e7d64f 100644 --- a/src/recipe/os/APT/Debian.c +++ b/src/recipe/os/APT/Debian.c @@ -64,7 +64,7 @@ os_debian_setsrc_for_deb822 (char *option) chsrc_run (cmd, RunOpt_Default); chsrc_run ("apt update", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); } @@ -103,7 +103,7 @@ os_debian_setsrc (char *option) chsrc_run (cmd, RunOpt_Default); chsrc_run ("apt update", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); } def_target(os_debian); diff --git a/src/recipe/os/APT/Kali-Linux.c b/src/recipe/os/APT/Kali-Linux.c index 516004b..17fa41d 100644 --- a/src/recipe/os/APT/Kali-Linux.c +++ b/src/recipe/os/APT/Kali-Linux.c @@ -52,7 +52,7 @@ os_kali_setsrc (char *option) chsrc_run (cmd, RunOpt_Default); chsrc_run ("apt update", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeUntested); + chsrc_conclude (&source, SetsrcType_Untested); } def_target(os_kali); diff --git a/src/recipe/os/APT/Linux-Lite.c b/src/recipe/os/APT/Linux-Lite.c index 2b0da05..33d316e 100644 --- a/src/recipe/os/APT/Linux-Lite.c +++ b/src/recipe/os/APT/Linux-Lite.c @@ -39,7 +39,7 @@ os_linuxlite_setsrc (char *option) char *cmd = xy_strjoin (3, "sed -E -i 's@https?://.*/.*/?@", source.url, "@g' " OS_Apt_SourceList); chsrc_run ("apt update", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); } def_target(os_linuxlite); diff --git a/src/recipe/os/APT/Linux-Mint.c b/src/recipe/os/APT/Linux-Mint.c index 20606c5..dfed765 100644 --- a/src/recipe/os/APT/Linux-Mint.c +++ b/src/recipe/os/APT/Linux-Mint.c @@ -44,7 +44,7 @@ os_linuxmint_setsrc (char *option) chsrc_run (cmd, RunOpt_Default); chsrc_run ("apt update", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); chsrc_warn2 ("完成后请不要再使用 mintsources(自带的图形化软件源设置工具)进行任何操作,因为在操作后,无论是否有按“确定”,mintsources 均会覆写我们刚才换源的内容"); } diff --git a/src/recipe/os/APT/ROS.c b/src/recipe/os/APT/ROS.c index 95a96ee..39a5290 100644 --- a/src/recipe/os/APT/ROS.c +++ b/src/recipe/os/APT/ROS.c @@ -46,7 +46,7 @@ os_ros_setsrc (char *option) chsrc_run (cmd, RunOpt_Default); chsrc_run ("apt update", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeUntested); + chsrc_conclude (&source, SetsrcType_Untested); } def_target_s(os_ros); diff --git a/src/recipe/os/APT/Raspberry-Pi-OS.c b/src/recipe/os/APT/Raspberry-Pi-OS.c index bfb0256..3e1e9aa 100644 --- a/src/recipe/os/APT/Raspberry-Pi-OS.c +++ b/src/recipe/os/APT/Raspberry-Pi-OS.c @@ -44,7 +44,7 @@ os_raspberrypi_setsrc (char *option) chsrc_run (cmd, RunOpt_Default); chsrc_run ("apt update", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeUntested); + chsrc_conclude (&source, SetsrcType_Untested); } def_target(os_raspberrypi); diff --git a/src/recipe/os/APT/Trisquel.c b/src/recipe/os/APT/Trisquel.c index ff2ddd0..db203a7 100644 --- a/src/recipe/os/APT/Trisquel.c +++ b/src/recipe/os/APT/Trisquel.c @@ -45,7 +45,7 @@ os_trisquel_setsrc (char *option) chsrc_run (cmd, RunOpt_Default); chsrc_run ("apt update", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeUntested); + chsrc_conclude (&source, SetsrcType_Untested); } def_target(os_trisquel); diff --git a/src/recipe/os/APT/Ubuntu.c b/src/recipe/os/APT/Ubuntu.c index f1447d7..7789b07 100644 --- a/src/recipe/os/APT/Ubuntu.c +++ b/src/recipe/os/APT/Ubuntu.c @@ -71,7 +71,7 @@ os_ubuntu_setsrc_for_deb822 (char *option) chsrc_run (cmd, RunOpt_Default); chsrc_run ("apt update", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); } /** @@ -112,7 +112,7 @@ os_ubuntu_setsrc (char *option) chsrc_run (cmd, RunOpt_Default); chsrc_run ("apt update", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); } def_target(os_ubuntu); diff --git a/src/recipe/os/APT/deepin.c b/src/recipe/os/APT/deepin.c index d93e5b9..5d646e9 100644 --- a/src/recipe/os/APT/deepin.c +++ b/src/recipe/os/APT/deepin.c @@ -51,7 +51,7 @@ os_deepin_setsrc (char *option) chsrc_run (cmd, RunOpt_Default); chsrc_run ("apt update", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeUntested); + chsrc_conclude (&source, SetsrcType_Untested); } def_target(os_deepin); diff --git a/src/recipe/os/APT/openKylin.c b/src/recipe/os/APT/openKylin.c index f14ed5e..dc98a3d 100644 --- a/src/recipe/os/APT/openKylin.c +++ b/src/recipe/os/APT/openKylin.c @@ -39,7 +39,7 @@ os_openkylin_setsrc (char *option) char *cmd = xy_strjoin (3, "sed -E -i 's@https?://.*/openkylin/?@", source.url, "@g'" OS_Apt_SourceList); chsrc_run (cmd, RunOpt_Default); chsrc_run ("apt update", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeUntested); + chsrc_conclude (&source, SetsrcType_Untested); } def_target(os_openkylin); diff --git a/src/recipe/os/Alpine-Linux.c b/src/recipe/os/Alpine-Linux.c index bb6e03d..7ada182 100644 --- a/src/recipe/os/Alpine-Linux.c +++ b/src/recipe/os/Alpine-Linux.c @@ -48,7 +48,7 @@ os_alpine_setsrc (char *option) chsrc_run (cmd, RunOpt_Default); chsrc_run ("apk update", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeUntested); + chsrc_conclude (&source, SetsrcType_Untested); } def_target(os_alpine); diff --git a/src/recipe/os/BSD/FreeBSD.c b/src/recipe/os/BSD/FreeBSD.c index 7ed9fa6..edf9783 100644 --- a/src/recipe/os/BSD/FreeBSD.c +++ b/src/recipe/os/BSD/FreeBSD.c @@ -128,7 +128,7 @@ os_freebsd_setsrc (char *option) chsrc_overwrite_file (update, "/etc/freebsd-update.conf"); */ - chsrc_conclude (&source, ChsrcTypeSemiAuto); + chsrc_conclude (&source, SetsrcType_SemiAuto); } def_target_s(os_freebsd); diff --git a/src/recipe/os/BSD/NetBSD.c b/src/recipe/os/BSD/NetBSD.c index da60453..48b78ac 100644 --- a/src/recipe/os/BSD/NetBSD.c +++ b/src/recipe/os/BSD/NetBSD.c @@ -58,7 +58,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_conclude (&source, ChsrcTypeUntested); + chsrc_conclude (&source, SetsrcType_Untested); } def_target(os_netbsd); diff --git a/src/recipe/os/BSD/OpenBSD.c b/src/recipe/os/BSD/OpenBSD.c index df6658d..a89cce1 100644 --- a/src/recipe/os/BSD/OpenBSD.c +++ b/src/recipe/os/BSD/OpenBSD.c @@ -47,7 +47,7 @@ os_openbsd_setsrc (char *option) chsrc_backup ("/etc/installurl"); chsrc_overwrite_file (source.url, "/etc/installurl"); - chsrc_conclude (&source, ChsrcTypeUntested); + chsrc_conclude (&source, SetsrcType_Untested); } def_target(os_openbsd); diff --git a/src/recipe/os/Gentoo-Linux.c b/src/recipe/os/Gentoo-Linux.c index ef7efc2..233c6f6 100644 --- a/src/recipe/os/Gentoo-Linux.c +++ b/src/recipe/os/Gentoo-Linux.c @@ -45,7 +45,7 @@ os_gentoo_setsrc (char *option) char *towrite = xy_strjoin (3, "GENTOO_MIRRORS=\"https://", source.url, "gentoo\""); chsrc_append_to_file (towrite, "/etc/portage/make.conf"); - chsrc_conclude (&source, ChsrcTypeUntested); + chsrc_conclude (&source, SetsrcType_Untested); } def_target_s(os_gentoo); diff --git a/src/recipe/os/OpenWrt.c b/src/recipe/os/OpenWrt.c index 2d58f0d..58d968a 100644 --- a/src/recipe/os/OpenWrt.c +++ b/src/recipe/os/OpenWrt.c @@ -50,7 +50,7 @@ os_openwrt_setsrc (char *option) char *cmd = xy_strjoin (3, "sed -E -i 's@https?://.*downloads.openwrt.org@", source.url, "@g' " OS_OpenWRT_SourceConfig); chsrc_run ("apt update", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); } diff --git a/src/recipe/os/Solus.c b/src/recipe/os/Solus.c index b08fd56..579113e 100644 --- a/src/recipe/os/Solus.c +++ b/src/recipe/os/Solus.c @@ -32,7 +32,7 @@ os_solus_setsrc (char *option) char *cmd = xy_2strjoin ("eopkg add-repo Solus ", source.url); chsrc_run (cmd, RunOpt_Default); - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); } def_target_s(os_solus); diff --git a/src/recipe/os/Void-Linux.c b/src/recipe/os/Void-Linux.c index 299c4bd..e357367 100644 --- a/src/recipe/os/Void-Linux.c +++ b/src/recipe/os/Void-Linux.c @@ -52,7 +52,7 @@ os_void_setsrc (char *option) chsrc_note2 ("若报错可尝试使用以下命令:"); say (cmd); - chsrc_conclude (&source, ChsrcTypeUntested); + chsrc_conclude (&source, SetsrcType_Untested); } def_target(os_void); diff --git a/src/recipe/os/YUM/AlmaLinux.c b/src/recipe/os/YUM/AlmaLinux.c index 99210fc..3c6f80c 100644 --- a/src/recipe/os/YUM/AlmaLinux.c +++ b/src/recipe/os/YUM/AlmaLinux.c @@ -36,7 +36,7 @@ os_almalinux_setsrc (char *option) chsrc_run (cmd, RunOpt_Default); chsrc_run ("dnf makecache", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); } def_target_s(os_almalinux); diff --git a/src/recipe/os/YUM/Anolis-OS.c b/src/recipe/os/YUM/Anolis-OS.c index 301a0db..e53d5bc 100644 --- a/src/recipe/os/YUM/Anolis-OS.c +++ b/src/recipe/os/YUM/Anolis-OS.c @@ -36,7 +36,7 @@ os_anolis_setsrc (char *option) chsrc_run ("dnf makecache", RunOpt_Default); chsrc_run ("dnf update", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeUntested); + chsrc_conclude (&source, SetsrcType_Untested); } def_target_s(os_anolis); diff --git a/src/recipe/os/YUM/Fedora-Linux.c b/src/recipe/os/YUM/Fedora-Linux.c index 4c5af07..7d2fb14 100644 --- a/src/recipe/os/YUM/Fedora-Linux.c +++ b/src/recipe/os/YUM/Fedora-Linux.c @@ -60,7 +60,7 @@ os_fedora_setsrc (char *option) chsrc_log2 ("已新增文件 /etc/yum.repos.d/fedora-updates-modular.repo"); chsrc_run ("dnf makecache", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); } def_target_s(os_fedora); diff --git a/src/recipe/os/YUM/Rocky-Linux.c b/src/recipe/os/YUM/Rocky-Linux.c index b8f073d..79f99b4 100644 --- a/src/recipe/os/YUM/Rocky-Linux.c +++ b/src/recipe/os/YUM/Rocky-Linux.c @@ -67,7 +67,7 @@ os_rockylinux_setsrc (char *option) chsrc_run (cmd, RunOpt_Default); chsrc_run ("dnf makecache", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); } diff --git a/src/recipe/os/YUM/openEuler.c b/src/recipe/os/YUM/openEuler.c index 3dd3307..89927ef 100644 --- a/src/recipe/os/YUM/openEuler.c +++ b/src/recipe/os/YUM/openEuler.c @@ -43,7 +43,7 @@ os_openeuler_setsrc (char *option) chsrc_overwrite_file (towrite, OS_openEuler_SourceList); chsrc_run ("dnf makecache", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); } def_target_s(os_openeuler); diff --git a/src/recipe/os/openSUSE.c b/src/recipe/os/openSUSE.c index 3ffb656..bc0fdc7 100644 --- a/src/recipe/os/openSUSE.c +++ b/src/recipe/os/openSUSE.c @@ -75,7 +75,7 @@ os_opensuse_setsrc (char *option) chsrc_run (cmd5, RunOpt_Default); chsrc_run (cmd6, RunOpt_Default); - chsrc_conclude (&source, ChsrcTypeUntested); + chsrc_conclude (&source, SetsrcType_Untested); } def_target_s(os_opensuse); diff --git a/src/recipe/os/pacman/Arch-Linux.c b/src/recipe/os/pacman/Arch-Linux.c index 09a93ea..456ad1b 100644 --- a/src/recipe/os/pacman/Arch-Linux.c +++ b/src/recipe/os/pacman/Arch-Linux.c @@ -91,7 +91,7 @@ os_arch_setsrc (char *option) { chsrc_run ("pacman -Syy", RunOpt_No_Last_New_Line); } - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); } @@ -124,7 +124,7 @@ os_archlinuxcn_setsrc (char *option) chsrc_run ("pacman -Sy archlinuxcn-keyring", RunOpt_Default); chsrc_run ("pacman -Syy", RunOpt_No_Last_New_Line); - chsrc_conclude (&source, ChsrcTypeUntested); + chsrc_conclude (&source, SetsrcType_Untested); } #undef OS_Pacman_MirrorList diff --git a/src/recipe/os/pacman/MSYS2.c b/src/recipe/os/pacman/MSYS2.c index a1afda7..f0d2cfb 100644 --- a/src/recipe/os/pacman/MSYS2.c +++ b/src/recipe/os/pacman/MSYS2.c @@ -47,7 +47,7 @@ os_msys2_setsrc (char *option) "#g\" /etc/pacman.d/mirrorlist* "); chsrc_run (cmd, RunOpt_Default); - chsrc_conclude (&source, ChsrcTypeUntested); + chsrc_conclude (&source, SetsrcType_Untested); } def_target_s(os_msys2); diff --git a/src/recipe/os/pacman/Manjaro-Linux.c b/src/recipe/os/pacman/Manjaro-Linux.c index 03032ed..c01e1ac 100644 --- a/src/recipe/os/pacman/Manjaro-Linux.c +++ b/src/recipe/os/pacman/Manjaro-Linux.c @@ -20,7 +20,7 @@ os_manjaro_setsrc (char *option) chsrc_run (cmd, RunOpt_Default); chsrc_run ("pacman -Syy", RunOpt_No_Last_New_Line); - chsrc_conclude (NULL, ChsrcTypeAuto); + chsrc_conclude (NULL, SetsrcType_Auto); } TargetInfo os_manjaro_target = {NULL, os_manjaro_setsrc, NULL, NULL, 0}; diff --git a/src/recipe/template.c b/src/recipe/template.c index cdd0f70..356985e 100644 --- a/src/recipe/template.c +++ b/src/recipe/template.c @@ -94,7 +94,7 @@ void __resetsrc (char *option) { // 往往通过下述方式统一在 setsrc() 中实现 - // __setsrc (ChsrcTypeReset); + // __setsrc (SetsrcType_Reset); } diff --git a/src/recipe/ware/Anaconda.c b/src/recipe/ware/Anaconda.c index 91be079..921fb62 100644 --- a/src/recipe/ware/Anaconda.c +++ b/src/recipe/ware/Anaconda.c @@ -67,7 +67,7 @@ wr_anaconda_setsrc (char *option) puts (file); chsrc_note2 ("然后运行 conda clean -i 清除索引缓存,保证用的是镜像站提供的索引"); - chsrc_conclude (&source, ChsrcTypeSemiAuto); + chsrc_conclude (&source, SetsrcType_SemiAuto); } def_target_s (wr_anaconda); diff --git a/src/recipe/ware/CocoaPods.c b/src/recipe/ware/CocoaPods.c index d35b078..2d75590 100644 --- a/src/recipe/ware/CocoaPods.c +++ b/src/recipe/ware/CocoaPods.c @@ -38,7 +38,7 @@ wr_cocoapods_setsrc (char *option) char *source_str = xy_strjoin (3, "source '", source.url, "'"); say (source_str); - chsrc_conclude (&source, ChsrcTypeManual); + chsrc_conclude (&source, SetsrcType_Manual); } def_target_s (wr_cocoapods); diff --git a/src/recipe/ware/Docker-Hub.c b/src/recipe/ware/Docker-Hub.c index 35e6951..c5ebd15 100644 --- a/src/recipe/ware/Docker-Hub.c +++ b/src/recipe/ware/Docker-Hub.c @@ -91,7 +91,7 @@ wr_dockerhub_setsrc (char *option) chsrc_note2 ("选择“Docker Engine”选项卡,在该选项卡中找到“registry-mirrors”一栏,添加镜像地址:"); puts (source.url); } - chsrc_conclude (&source, ChsrcTypeManual); + chsrc_conclude (&source, SetsrcType_Manual); } diff --git a/src/recipe/ware/Emacs.c b/src/recipe/ware/Emacs.c index 03cd79d..60d51dc 100644 --- a/src/recipe/ware/Emacs.c +++ b/src/recipe/ware/Emacs.c @@ -35,7 +35,7 @@ wr_emacs_setsrc (char *option) chsrc_note2 ("Emacs换源涉及Elisp,需要手动查阅并换源:"); puts (source.url); - chsrc_conclude (&source, ChsrcTypeManual); + chsrc_conclude (&source, SetsrcType_Manual); } def_target_s (wr_emacs); diff --git a/src/recipe/ware/Flathub.c b/src/recipe/ware/Flathub.c index ee2d30a..22d620c 100644 --- a/src/recipe/ware/Flathub.c +++ b/src/recipe/ware/Flathub.c @@ -37,7 +37,7 @@ wr_flathub_setsrc (char *option) char *cmd = xy_2strjoin ("flatpak remote-modify flathub --url=", source.url); chsrc_run (cmd, RunOpt_Default); - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); } def_target_s (wr_flathub); diff --git a/src/recipe/ware/Guix.c b/src/recipe/ware/Guix.c index 602b244..3fd5a63 100644 --- a/src/recipe/ware/Guix.c +++ b/src/recipe/ware/Guix.c @@ -33,7 +33,7 @@ wr_guix_setsrc (char *option) chsrc_note2 ("为防止扰乱配置文件,请您手动写入以下内容到 ~/.config/guix/channels.scm 文件中"); puts (file); - chsrc_conclude (&source, ChsrcTypeManual); + chsrc_conclude (&source, SetsrcType_Manual); } def_target_s (wr_guix); diff --git a/src/recipe/ware/Homebrew.c b/src/recipe/ware/Homebrew.c index 8b4653d..72cd1b3 100644 --- a/src/recipe/ware/Homebrew.c +++ b/src/recipe/ware/Homebrew.c @@ -89,7 +89,7 @@ wr_homebrew_setsrc (char *option) chsrc_append_to_file (core_git_remote_fish, fishrc); } - chsrc_conclude(&source, ChsrcTypeAuto); + chsrc_conclude(&source, SetsrcType_Auto); chsrc_note2 ("请您重启终端使Homebrew环境变量生效"); } diff --git a/src/recipe/ware/Nix.c b/src/recipe/ware/Nix.c index 19301f4..fcbc8c9 100644 --- a/src/recipe/ware/Nix.c +++ b/src/recipe/ware/Nix.c @@ -56,7 +56,7 @@ wr_nix_setsrc (char *option) chsrc_note2 ("若您使用的是NixOS,请额外添加下述内容至 configuration.nix 中"); puts (cmd); - chsrc_conclude (&source, ChsrcTypeSemiAuto); + chsrc_conclude (&source, SetsrcType_SemiAuto); } def_target_s (wr_nix); diff --git a/src/recipe/ware/TeX-Live.c b/src/recipe/ware/TeX-Live.c index 4443aab..dcc1800 100644 --- a/src/recipe/ware/TeX-Live.c +++ b/src/recipe/ware/TeX-Live.c @@ -78,7 +78,7 @@ wr_tex_setsrc (char *option) chsrc_run (cmd, RunOpt_Default); } - chsrc_conclude (&source, ChsrcTypeUntested); + chsrc_conclude (&source, SetsrcType_Untested); } def_target(wr_tex); diff --git a/src/recipe/ware/WinGet.c b/src/recipe/ware/WinGet.c index 02b484e..5c65068 100644 --- a/src/recipe/ware/WinGet.c +++ b/src/recipe/ware/WinGet.c @@ -34,14 +34,14 @@ wr_winget_setsrc (char *option) chsrc_run ("winget source remove winget", RunOpt_Default); chsrc_run (xy_2strjoin ("winget source add winget ", source.url), RunOpt_Default); - chsrc_conclude (&source, ChsrcTypeAuto); + chsrc_conclude (&source, SetsrcType_Auto); } void wr_winget_resetsrc (char *option) { chsrc_run ("winget source reset winget", RunOpt_Default); - chsrc_conclude (NULL, ChsrcTypeAuto); + chsrc_conclude (NULL, SetsrcType_Auto); }