mirror of
https://github.com/RubyMetric/chsrc
synced 2025-12-27 21:19:31 +08:00
Use chsrc_determine_chgtype()
This commit is contained in:
@@ -74,7 +74,7 @@ wr_anaconda_setsrc (char *option)
|
||||
|
||||
chsrc_note2 ("然后运行 conda clean -i 清除索引缓存,保证用的是镜像站提供的索引");
|
||||
|
||||
ProgMode_ChgType = ChgType_SemiAuto;
|
||||
chsrc_determine_chgtype (ChgType_SemiAuto);
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ wr_cocoapods_setsrc (char *option)
|
||||
char *source_str = xy_strjoin (3, "source '", source.url, "'");
|
||||
p(source_str);
|
||||
|
||||
ProgMode_ChgType = ChgType_Manual;
|
||||
chsrc_determine_chgtype (ChgType_Manual);
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ wr_dockerhub_setsrc (char *option)
|
||||
puts (source.url);
|
||||
}
|
||||
|
||||
ProgMode_ChgType = ChgType_Manual;
|
||||
chsrc_determine_chgtype (ChgType_SemiAuto);
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ wr_emacs_setsrc (char *option)
|
||||
chsrc_note2 ("Emacs换源涉及Elisp,需要手动查阅并换源:");
|
||||
p(source.url);
|
||||
|
||||
ProgMode_ChgType = ChgType_Manual;
|
||||
chsrc_determine_chgtype (ChgType_Manual);
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
ProgMode_ChgType = ChgType_Auto;
|
||||
chsrc_determine_chgtype (ChgType_Auto);
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ wr_guix_setsrc (char *option)
|
||||
chsrc_note2 ("为防止扰乱配置文件,请您手动写入以下内容到 ~/.config/guix/channels.scm 文件中");
|
||||
p(file);
|
||||
|
||||
ProgMode_ChgType = ChgType_Manual;
|
||||
chsrc_determine_chgtype (ChgType_Manual);
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ wr_homebrew_setsrc (char *option)
|
||||
chsrc_append_to_file (w, fishrc);
|
||||
}
|
||||
|
||||
ProgMode_ChgType = ChgType_Auto;
|
||||
chsrc_determine_chgtype (ChgType_Auto);
|
||||
chsrc_conclude (&source);
|
||||
chsrc_note2 ("请您重启终端使Homebrew环境变量生效");
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ wr_nix_setsrc (char *option)
|
||||
chsrc_note2 ("若您使用的是NixOS,请额外添加下述内容至 configuration.nix 中");
|
||||
p(cmd);
|
||||
|
||||
ProgMode_ChgType = ChgType_SemiAuto;
|
||||
chsrc_determine_chgtype (ChgType_SemiAuto);
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ wr_tex_setsrc (char *option)
|
||||
chsrc_run (cmd, RunOpt_Default);
|
||||
}
|
||||
|
||||
ProgMode_ChgType = ChgType_Untested;
|
||||
chsrc_determine_chgtype (ChgType_Untested);
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ 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);
|
||||
|
||||
ProgMode_ChgType = ChgType_Auto;
|
||||
chsrc_determine_chgtype (ChgType_Auto);
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ wr_winget_resetsrc (char *option)
|
||||
{
|
||||
chsrc_run ("winget source reset winget", RunOpt_Default);
|
||||
|
||||
ProgMode_ChgType = ChgType_Auto;
|
||||
chsrc_determine_chgtype (ChgType_Reset);
|
||||
chsrc_conclude (NULL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user