mirror of
https://github.com/RubyMetric/chsrc
synced 2025-10-20 18:05:08 +08:00
Use chsrc_determine_chgtype()
This commit is contained in:
@@ -24,18 +24,20 @@ pl_ocaml_check_cmd ()
|
||||
chsrc_ensure_program ("opam");
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
pl_ocaml_getsrc(char *option)
|
||||
pl_ocaml_getsrc (char *option)
|
||||
{
|
||||
pl_ocaml_check_cmd ();
|
||||
chsrc_run ("opam repo get-url default", RunOpt_Default);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 参考: https://mirrors.sjtug.sjtu.edu.cn/docs/git/opam-repository.git
|
||||
* @consult https://mirrors.sjtug.sjtu.edu.cn/docs/git/opam-repository.git
|
||||
*/
|
||||
void
|
||||
pl_ocaml_setsrc(char *option)
|
||||
pl_ocaml_setsrc (char *option)
|
||||
{
|
||||
pl_ocaml_check_cmd ();
|
||||
|
||||
@@ -50,7 +52,7 @@ pl_ocaml_setsrc(char *option)
|
||||
chsrc_note2 ("如果是首次使用 opam ,请使用以下命令进行初始化");
|
||||
p(xy_2strjoin ("opam init default ", source.url));
|
||||
|
||||
ProgMode_ChgType = ChgType_SemiAuto;
|
||||
chsrc_determine_chgtype (ChgType_SemiAuto);
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user