mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-02-24 05:50:55 +08:00
Rename cli option macros
This commit is contained in:
parent
d310dce76e
commit
2d352c3981
@ -89,9 +89,9 @@ chsrc_log_cmd_result (bool result, int ret_code)
|
||||
}
|
||||
|
||||
|
||||
bool Cli_Option_IPv6 = false;
|
||||
bool Cli_Option_Locally = false;
|
||||
bool Cli_Option_InEnglish = false;
|
||||
bool CliOpt_IPv6 = false;
|
||||
bool CliOpt_Locally = false;
|
||||
bool CliOpt_InEnglish = false;
|
||||
bool CliOpt_DryRun = false;
|
||||
|
||||
bool
|
||||
@ -291,7 +291,7 @@ test_speed_url (const char *url)
|
||||
|
||||
char *ipv6 = ""; // 默认不启用
|
||||
|
||||
if (Cli_Option_IPv6==true)
|
||||
if (CliOpt_IPv6==true)
|
||||
{
|
||||
ipv6 = "--ipv6";
|
||||
}
|
||||
|
12
src/chsrc.c
12
src/chsrc.c
@ -66,7 +66,7 @@ pl_ruby_setsrc (char *option)
|
||||
chsrc_ensure_program ("bundle");
|
||||
|
||||
char *where = " --global ";
|
||||
if (Cli_Option_Locally==true)
|
||||
if (CliOpt_Locally==true)
|
||||
{
|
||||
where = " --local ";
|
||||
}
|
||||
@ -145,7 +145,7 @@ pl_nodejs_setsrc (char *option)
|
||||
char *cmd = NULL;
|
||||
|
||||
char *where = " ";
|
||||
if (Cli_Option_Locally==true)
|
||||
if (CliOpt_Locally==true)
|
||||
{
|
||||
where = " --location project ";
|
||||
}
|
||||
@ -241,7 +241,7 @@ pl_php_setsrc (char *option)
|
||||
chsrc_confirm_source (&source);
|
||||
|
||||
char *where = " -g ";
|
||||
if (Cli_Option_Locally==true)
|
||||
if (CliOpt_Locally==true)
|
||||
{
|
||||
where = " ";
|
||||
}
|
||||
@ -2690,15 +2690,15 @@ main (int argc, char const *argv[])
|
||||
{
|
||||
if (xy_streql (argv[i], "-ipv6"))
|
||||
{
|
||||
Cli_Option_IPv6 = true;
|
||||
CliOpt_IPv6 = true;
|
||||
}
|
||||
else if (xy_streql (argv[i], "-local"))
|
||||
{
|
||||
Cli_Option_Locally = true;
|
||||
CliOpt_Locally = true;
|
||||
}
|
||||
else if (xy_streql (argv[i], "-en") || xy_streql (argv[i], "-english"))
|
||||
{
|
||||
Cli_Option_InEnglish = true;
|
||||
CliOpt_InEnglish = true;
|
||||
}
|
||||
else if (xy_streql (argv[i], "-dry"))
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
* -------------------------------------------------------------
|
||||
* Contributors : Aoran Zeng <ccmywish@qq.com>
|
||||
* Created on : <2023-09-01>
|
||||
* Last modified : <2024-08-08>
|
||||
* Last modified : <2024-08-09>
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -125,7 +125,7 @@ pl_python_setsrc (char *option)
|
||||
if (pdm_exist)
|
||||
{
|
||||
char *where = " --global ";
|
||||
if (Cli_Option_Locally==true)
|
||||
if (CliOpt_Locally==true)
|
||||
{
|
||||
where = " --local ";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user