mirror of
https://github.com/RubyMetric/chsrc
synced 2025-06-22 20:42:46 +08:00
Use println
in chsrc
This commit is contained in:
parent
ba6fa809d4
commit
5b70f7fd8c
@ -9,7 +9,7 @@
|
||||
* | Yangmoooo <yangmoooo@outlook.com>
|
||||
* |
|
||||
* Created On : <2023-08-29>
|
||||
* Last Modified : <2025-06-19>
|
||||
* Last Modified : <2025-06-20>
|
||||
*
|
||||
* chsrc framework
|
||||
* ------------------------------------------------------------*/
|
||||
@ -631,7 +631,7 @@ measure_speed_for_every_source (Source_t sources[], int size, double speed_recor
|
||||
skip_reason = CliOpt_InEnglish ? "SKIP for no reason" : "无理由跳过";
|
||||
}
|
||||
measure_msgs[i] = xy_strjoin (4, " x ", msg, " ", yellow(skip_reason));
|
||||
printf ("%s\n", measure_msgs[i]);
|
||||
println (measure_msgs[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -646,8 +646,7 @@ measure_speed_for_every_source (Source_t sources[], int size, double speed_recor
|
||||
measure_msgs[i] = xy_strjoin (3, " - ", msg, " ... ");
|
||||
}
|
||||
|
||||
|
||||
printf ("%s", measure_msgs[i]);
|
||||
print (measure_msgs[i]);
|
||||
fflush (stdout);
|
||||
|
||||
char *url_ = xy_strdup (url);
|
||||
|
@ -41,7 +41,7 @@ pl_haskell_setsrc (char *option)
|
||||
}
|
||||
|
||||
chsrc_note2 (xy_strjoin (3, "请向 ", config, " 中手动添加:"));
|
||||
puts (file); br();
|
||||
println (file); br();
|
||||
|
||||
config = xy_normalize_path ("~/.stack/config.yaml");
|
||||
file = xy_strjoin (3, "package-indices:\n"
|
||||
|
@ -83,7 +83,7 @@ pl_java_setsrc (char *option)
|
||||
|
||||
char *maven_config = pl_java_find_maven_config ();
|
||||
chsrc_note2 (xy_strjoin (3, "请在您的 maven 配置文件 ", maven_config, " 中添加:"));
|
||||
puts (file);
|
||||
println (file);
|
||||
}
|
||||
|
||||
if (gradle_exist)
|
||||
|
@ -46,7 +46,7 @@ pl_lua_setsrc (char *option)
|
||||
"}");
|
||||
|
||||
chsrc_note2 ("请手动修改 ~/.luarocks/config.lua 文件 (用于下载):");
|
||||
puts (config);
|
||||
println (config);
|
||||
|
||||
char *upload_config = xy_strjoin (3, "key = \"<Your API Key>\"\n"
|
||||
"server = \"", source.url, "\"");
|
||||
|
@ -47,7 +47,7 @@ pl_python_rye_setsrc (char *option)
|
||||
|
||||
char *rye_config = pl_python_find_rye_config ();
|
||||
chsrc_note2 (xy_strjoin (3, "请在您的 Rye 配置文件 ", rye_config, " 中添加:"));
|
||||
puts (file);
|
||||
println (file);
|
||||
|
||||
chsrc_determine_chgtype (ChgType_Manual);
|
||||
chsrc_conclude (&source);
|
||||
|
@ -70,7 +70,7 @@ wr_anaconda_setsrc (char *option)
|
||||
}
|
||||
|
||||
chsrc_note2 (xy_strjoin (3, "请向 ", config, " 中手动添加:"));
|
||||
puts (file);
|
||||
println (file);
|
||||
|
||||
chsrc_note2 ("然后运行 conda clean -i 清除索引缓存,保证用的是镜像站提供的索引");
|
||||
|
||||
|
@ -135,7 +135,7 @@ wr_dockerhub_setsrc (char *option)
|
||||
chsrc_append_to_file (to_add, WARE_DockerHub_SourceConfig);
|
||||
}
|
||||
// chsrc_note2 ("请向 /etc/docker/daemon.json 中添加下述内容:");
|
||||
// puts (to_add);
|
||||
// println (to_add);
|
||||
if (xy_on_linux)
|
||||
{
|
||||
// 由于 systemctl restart docker 会导致所有容器停止,所以不自动重启
|
||||
@ -151,7 +151,7 @@ wr_dockerhub_setsrc (char *option)
|
||||
{
|
||||
chsrc_note2 ("请打开Docker Desktop设置");
|
||||
chsrc_note2 ("选择“Docker Engine”选项卡,在该选项卡中找到“registry-mirrors”一栏,添加镜像地址:");
|
||||
puts (source.url);
|
||||
println (source.url);
|
||||
}
|
||||
|
||||
chsrc_determine_chgtype (ChgType_SemiAuto);
|
||||
|
@ -109,8 +109,7 @@ main (int argc, char const *argv[])
|
||||
assert (xy_dir_exist ("/etc"));
|
||||
}
|
||||
|
||||
|
||||
puts (xy_normalize_path (" \n ~/haha/test/123 \n\r "));
|
||||
println (xy_normalize_path (" \n ~/haha/test/123 \n\r "));
|
||||
assert_str (xy_normalize_path ("~/haha/test"), xy_parent_dir (" ~/haha/test/123"));
|
||||
|
||||
xy_succ ("测试完成", "xy.h 测试全部通过");
|
||||
|
Loading…
x
Reference in New Issue
Block a user