mirror of
https://github.com/RubyMetric/chsrc
synced 2025-12-24 11:32:01 +08:00
Split winget out
This commit is contained in:
31
src/chsrc.c
31
src/chsrc.c
@@ -177,36 +177,7 @@ wr_tex_setsrc (char *option)
|
||||
|
||||
|
||||
#include "recipe/ware/emacs.c"
|
||||
|
||||
|
||||
void
|
||||
wr_winget_getsrc (char *option)
|
||||
{
|
||||
chsrc_run ("winget source list", RunOpt_Default);
|
||||
}
|
||||
|
||||
/* 参考:https://mirrors.ustc.edu.cn/help/winget-source.html */
|
||||
void
|
||||
wr_winget_setsrc (char *option)
|
||||
{
|
||||
SourceInfo source;
|
||||
chsrc_yield_source (wr_winget);
|
||||
chsrc_confirm_source (&source);
|
||||
|
||||
chsrc_run ("winget source remove winget", RunOpt_Default);
|
||||
chsrc_run (xy_2strjoin ("winget source add winget ", source.url), RunOpt_Default);
|
||||
|
||||
chsrc_say_lastly (&source, ChsrcTypeAuto);
|
||||
}
|
||||
|
||||
void
|
||||
wr_winget_resetsrc (char *option)
|
||||
{
|
||||
chsrc_run ("winget source reset winget", RunOpt_Default);
|
||||
chsrc_say_lastly (NULL, ChsrcTypeAuto);
|
||||
}
|
||||
|
||||
|
||||
#include "recipe/ware/WinGet.c"
|
||||
#include "recipe/ware/Homebrew.c"
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user