Skip to content

Commit 3fe3549

Browse files
committed
Update recipe template
1 parent 68175ed commit 3fe3549

File tree

1 file changed

+28
-17
lines changed

1 file changed

+28
-17
lines changed

src/recipe/recipe-template.c

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Contributors : Nil Null <[email protected]>
77
* |
88
* Created On : <2024-08-09>
9-
* Last Modified : <2025-08-10>
9+
* Last Modified : <2025-08-11>
1010
* -------------------------------------------------------------
1111
* 本文件作为一个通用模板:
1212
*
@@ -37,14 +37,22 @@ def_target(<category>_<target>);
3737
* 定义专服务于该target的镜像站,该例数据为虚拟填充
3838
*/
3939
static MirrorSite_t
40-
RubyMetric = {"rbmt", // 该镜像站的 code, 可以这么使用: chsrc set <target> rbmt
41-
"RubyMetric", // 该镜像站的缩写
42-
"RubyMetric.com", // 该镜像站的全名
43-
"https://rubymetirc.com", // 镜像站首页
44-
// 镜像站某个较大的可下载物的下载链接,用于测速
45-
"https://rubymetirc.com/target/aws/aws-sdk-go/@v/v1.45.2.zip",
40+
RubyMetric = {
41+
IS_DedicatedMirrorSite, /* 镜像站类型 */
42+
"rbmt", /* 该镜像站的 code, 可以这么使用: chsrc set <target> rbmt */
43+
44+
/* 该镜像站的英文缩写 | 该镜像站的全名 | 镜像站首页 */
45+
"RubyMetric", "RubyMetric 镜像站", "https://rubymetirc.com",
46+
47+
/* 是否跳过测速 | 跳过原因(中文) | 跳过原因(英文) */
48+
{NotSkip, NA, NA,
49+
/* 镜像站某个较大的可下载物的下载链接,用于测速 */
50+
"https://rubymetirc.com/target/aws/aws-sdk-go/@v/v1.45.2.zip",
51+
/* 是否为精准测速,若使用间接URL来测速,则填ROUGH */
52+
ACCURATE
53+
};
54+
}
4655

47-
ACCURATE}; // 是否为精准测速,若使用间接URL来测速,则填ROUGH
4856

4957

5058
void
@@ -58,7 +66,7 @@ void
5866

5967
chef_set_created_on (this, "2024-08-09");
6068
chef_set_last_updated (this, "2025-08-12");
61-
chef_set_sources_last_updated (this, "2025-08-10");
69+
chef_set_sources_last_updated (this, "2025-08-11");
6270

6371
chef_set_authors (this, 1, "Aoran Zeng", "[email protected]");
6472
chef_set_chef (this, NULL, NULL);
@@ -75,14 +83,14 @@ void
7583
// chef_allow_user_define(this);
7684
chef_forbid_user_define(this);
7785

78-
chef_set_note ("备注说明...", "Note...");
86+
chef_set_note ("中文备注说明...", "English note...");
7987

8088
def_sources_begin()
81-
{&UpstreamProvider, "上游地址,若维护者暂时未知可填NULL这个主要用于reset", DelegateToUpstream}
82-
{&RubyMetric, "https://rubymetirc.com/target", DelegateToMirror},
83-
{&RubyInstaller, "https://rubyinstaller.cn/target", DelegateToMirror},
84-
{&Gitee, "https://gitee.com/RubyMetric/chsrc", DelegateToMirror},
85-
{&GitHub, "https://github.com/RubyMetric/chsrc", "https://一个精准测速链接"}
89+
{&UpstreamProvider, "上游默认源链接, 若维护者暂时未知, 可填NULL, 这个主要用于reset", DelegateToUpstream}
90+
{&RubyMetric, "https://rubymetirc.com/target", DelegateToMirror},
91+
{&RubyInstaller, "https://rubyinstaller.cn/target", DelegateToMirror},
92+
{&Gitee, "https://gitee.com/RubyMetric/chsrc", DelegateToMirror},
93+
{&GitHub, "https://github.com/RubyMetric/chsrc", "https://一个精准测速链接"}
8694
def_sources_end()
8795
}
8896

@@ -108,8 +116,11 @@ void
108116
void
109117
<category>_<target>_setsrc (char *option)
110118
{
111-
/* 下面这行是必须的,注入source变量 */
112-
chsrc_yield_source_and_confirm (<category>_<target>);
119+
/* 下面这行是必须的,注入 source 变量 */
120+
use_this_source(<category>_<target>);
121+
122+
/* 如果是 target group,你可能想要指定不同的 target 来使用它的源 */
123+
// Source_t source = chsrc_yield_source_and_confirm (&pl_js_group_target, option);
113124

114125
/* 具体的换源步骤,如调用第三方命令... */
115126

0 commit comments

Comments
 (0)