mirror of
https://github.com/RubyMetric/chsrc
synced 2025-10-20 09:51:39 +08:00
使用 xy.
This commit is contained in:
@@ -55,7 +55,7 @@ pl_dart_flutter_setsrc (char *option)
|
||||
|
||||
char *w = NULL;
|
||||
char *cmd = NULL;
|
||||
if (xy_on_windows)
|
||||
if (xy.on_windows)
|
||||
{
|
||||
cmd = xy_strcat (3, "setx FLUTTER_STORAGE_BASE_URL \"", source.url, "\"");
|
||||
chsrc_run (cmd, RunOpt_No_Last_New_Line);
|
||||
|
@@ -51,7 +51,7 @@ pl_dart_setsrc (char *option)
|
||||
|
||||
char *w = NULL;
|
||||
char *cmd = NULL;
|
||||
if (xy_on_windows)
|
||||
if (xy.on_windows)
|
||||
{
|
||||
cmd = xy_strcat (3, "setx PUB_HOSTED_URL \"", source.url, "\"");
|
||||
chsrc_run (cmd, RunOpt_No_Last_New_Line);
|
||||
|
@@ -44,7 +44,7 @@ pl_haskell_setsrc (char *option)
|
||||
char *content = xy_str_gsub (RAWSTR_pl_haskell_cabal_config, "@url@", source.url);
|
||||
|
||||
char *config = NULL;
|
||||
if (xy_on_windows)
|
||||
if (xy.on_windows)
|
||||
{
|
||||
config = xy_normalize_path ("~/AppData/Roaming/cabal/config");
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ pl_python_find_uv_config (bool mkdir)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (xy_on_windows)
|
||||
if (xy.on_windows)
|
||||
{
|
||||
/* config path on Windows */
|
||||
char *appdata = getenv ("APPDATA");
|
||||
|
@@ -46,7 +46,7 @@ pl_r_getsrc (char *option)
|
||||
* options()$repos
|
||||
* options()$BioC_mirror
|
||||
*/
|
||||
if (xy_on_windows)
|
||||
if (xy.on_windows)
|
||||
{
|
||||
chsrc_view_file (PL_R_Config_Windows);
|
||||
}
|
||||
@@ -74,7 +74,7 @@ pl_r_setsrc (char *option)
|
||||
|
||||
// 或者我们调用 r.exe --slave -e 上面的内容
|
||||
|
||||
char *config = xy_on_windows ? PL_R_Config_Windows : PL_R_Config_POSIX;
|
||||
char *config = xy.on_windows ? PL_R_Config_Windows : PL_R_Config_POSIX;
|
||||
|
||||
chsrc_append_to_file (w, config);
|
||||
|
||||
|
@@ -59,7 +59,7 @@ wr_anaconda_setsrc (char *option)
|
||||
/* Windows 也是在这里 */
|
||||
char *configfile = xy_2strcat (xy_os_home, "/.condarc");
|
||||
|
||||
if (xy_on_windows)
|
||||
if (xy.on_windows)
|
||||
{
|
||||
if (xy_file_exist (configfile))
|
||||
{
|
||||
|
@@ -50,7 +50,7 @@ wr_docker_prelude ()
|
||||
void
|
||||
wr_docker_getsrc (char *option)
|
||||
{
|
||||
if (xy_on_linux || xy_on_bsd)
|
||||
if (xy.on_linux || xy.on_bsd)
|
||||
{
|
||||
chsrc_view_file (WR_Docker_ConfigFile);
|
||||
}
|
||||
@@ -73,7 +73,7 @@ wr_docker_setsrc (char *option)
|
||||
|
||||
chsrc_use_this_source (wr_docker);
|
||||
|
||||
if (xy_on_linux || xy_on_bsd)
|
||||
if (xy.on_linux || xy.on_bsd)
|
||||
{
|
||||
char *to_add = xy_str_gsub (RAWSTR_wr_docker_insert_content, "@1@", source.url);
|
||||
|
||||
@@ -119,7 +119,7 @@ wr_docker_setsrc (char *option)
|
||||
chsrc_append_to_file (to_add, WR_Docker_ConfigFile);
|
||||
}
|
||||
|
||||
if (xy_on_linux)
|
||||
if (xy.on_linux)
|
||||
{
|
||||
/* 由于 systemctl restart docker 会导致所有容器停止,所以不自动重启 */
|
||||
chsrc_alert2 ("请自行运行: sudo systemctl restart docker");
|
||||
|
Reference in New Issue
Block a user