2024-08-21 20:13:29 +08:00
|
|
|
|
.\" --------------------------------------------------------------
|
|
|
|
|
.\" SPDX-License-Identifier: GFDL-1.3-or-later
|
|
|
|
|
.\" --------------------------------------------------------------
|
2024-08-22 12:07:43 +08:00
|
|
|
|
.\" Doc Type : Man Page
|
2024-08-21 20:13:29 +08:00
|
|
|
|
.\" Doc Authors : Aoran Zeng <ccmywish@qq.com>
|
|
|
|
|
.\" Contributors : Nul None <nul@none.org>
|
|
|
|
|
.\" |
|
|
|
|
|
.\" Created On : <2024-08-21>
|
2024-09-04 12:09:59 +08:00
|
|
|
|
.\" Last Modified : <2024-09-04>
|
2024-08-21 20:13:29 +08:00
|
|
|
|
.\" --------------------------------------------------------------
|
|
|
|
|
|
2024-09-04 12:09:59 +08:00
|
|
|
|
.TH chsrc 1 "2024-09-04" "v0.1.8.1dev2" "RubyMetric chsrc"
|
2024-08-21 20:13:29 +08:00
|
|
|
|
|
|
|
|
|
.SH NAME
|
|
|
|
|
chsrc - Change Source for every software on every platform from the command line
|
|
|
|
|
|
|
|
|
|
.SH SYNOPSIS
|
2024-08-21 22:27:16 +08:00
|
|
|
|
.SY chsrc
|
|
|
|
|
<command> [options] [target] [mirror]
|
|
|
|
|
.YS
|
|
|
|
|
|
2024-08-21 20:13:29 +08:00
|
|
|
|
|
|
|
|
|
.SH DESCRIPTION
|
2024-08-21 22:27:16 +08:00
|
|
|
|
.SS 基本命令
|
|
|
|
|
.TP
|
|
|
|
|
.B help
|
|
|
|
|
打印此帮助,或 h, -h, --help
|
|
|
|
|
.TP
|
|
|
|
|
.B issue
|
|
|
|
|
查看相关issue
|
|
|
|
|
|
|
|
|
|
.TP
|
|
|
|
|
\fBlist\fR (或 \fBls\fR, 或 \fBl\fR)
|
|
|
|
|
列出可用镜像源,和可换源目标
|
|
|
|
|
.TP
|
|
|
|
|
.B list mirror/target
|
|
|
|
|
列出可用镜像源,或可换源目标
|
|
|
|
|
.B list os/lang/ware
|
|
|
|
|
列出可换源的操作系统/编程语言/软件
|
|
|
|
|
|
|
|
|
|
.SS 测速命令
|
|
|
|
|
.TP
|
|
|
|
|
.B measure/cesu \fI<target>\fI
|
|
|
|
|
对该目标所有源测速
|
|
|
|
|
|
|
|
|
|
.SS 查看配置命令
|
|
|
|
|
.TP
|
|
|
|
|
.B list \fI<target>\fR
|
|
|
|
|
查看该目标可用源与支持功能
|
|
|
|
|
.TP
|
|
|
|
|
.B get \fI<target>\fR
|
|
|
|
|
查看该目标当前源的使用情况
|
|
|
|
|
|
|
|
|
|
.SS 换源命令
|
|
|
|
|
.TP
|
|
|
|
|
.B set \fI<target>\fR
|
|
|
|
|
换源,自动测速后挑选最快源
|
|
|
|
|
.TP
|
|
|
|
|
.B set \fI<target>\fR first
|
|
|
|
|
换源,使用维护团队测速第一的源
|
|
|
|
|
.TP
|
|
|
|
|
.B set \fI<target>\fR \fI<mirror>\fR
|
|
|
|
|
换源,指定使用某镜像站 (通过list <target>查看)
|
|
|
|
|
.TP
|
|
|
|
|
.B set \fI<target>\fR \fU<https://url>\fR
|
|
|
|
|
换源,用户自定义源URL
|
|
|
|
|
.TP
|
|
|
|
|
.B reset \fI<target>\fR
|
|
|
|
|
重置,使用上游默认使用的源
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.SH OPTIONS
|
|
|
|
|
.TP
|
|
|
|
|
\fB-dry\fR
|
|
|
|
|
Dry Run,模拟换源过程,命令仅打印并不运行
|
|
|
|
|
.TP
|
2024-09-04 12:09:59 +08:00
|
|
|
|
\fB-para(llel)\fR
|
|
|
|
|
并行测速 (默认的顺序测速更有参考意义)
|
2024-08-21 22:27:16 +08:00
|
|
|
|
.TP
|
|
|
|
|
\fB-local\fR
|
|
|
|
|
仅对本项目而非全局换源 (通过ls \fI<target>\fR查看支持情况)
|
2024-08-22 22:29:44 +08:00
|
|
|
|
.TP
|
2024-09-04 12:09:59 +08:00
|
|
|
|
\fB-ipv6\fR
|
|
|
|
|
使用IPv6测速
|
|
|
|
|
.TP
|
2024-08-22 22:29:44 +08:00
|
|
|
|
\fB-en(glish)\fR
|
|
|
|
|
使用英文输出
|
2024-08-23 08:16:02 +08:00
|
|
|
|
.TP
|
|
|
|
|
\fB-no-color\fR
|
|
|
|
|
无颜色输出
|
2024-08-21 22:27:16 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.SH "EXIT STATUS"
|
2024-08-21 20:13:29 +08:00
|
|
|
|
.br
|
|
|
|
|
.TP
|
|
|
|
|
0
|
|
|
|
|
正常执行,一般表示换源成功
|
|
|
|
|
.TP
|
|
|
|
|
1
|
|
|
|
|
用户环境导致的错误,如命令缺失
|
|
|
|
|
.TP
|
|
|
|
|
2
|
|
|
|
|
chsrc 暂未实现支持
|
|
|
|
|
.TP
|
|
|
|
|
3
|
|
|
|
|
维护者导致的镜像站、源信息相关错误
|
|
|
|
|
.TP
|
|
|
|
|
4
|
|
|
|
|
致命错误,由内部Bug导致
|
|
|
|
|
.TP
|
|
|
|
|
5
|
|
|
|
|
致命未知错误,往往代表内部未知Bug
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-08-21 22:27:16 +08:00
|
|
|
|
.SH EXAMPLES
|
|
|
|
|
.EX
|
|
|
|
|
# 测速,寻找最快者,换源
|
|
|
|
|
$ chsrc set ruby
|
|
|
|
|
|
|
|
|
|
# 列出可用的镜像站
|
|
|
|
|
# 使用 RubyChina 作为镜像站
|
|
|
|
|
$ chsrc ls ruby
|
|
|
|
|
$ chsrc set ruby rubychina
|
|
|
|
|
|
|
|
|
|
# 如果您有自己的镜像地址,使用自定义URL
|
|
|
|
|
$ chsrc set ruby https://gems.ruby-china.com/
|
|
|
|
|
|
|
|
|
|
# 使用维护团队测试的最快镜像站
|
|
|
|
|
$ chsrc set ruby first
|
|
|
|
|
.EE
|
|
|
|
|
|
2024-08-21 20:13:29 +08:00
|
|
|
|
|
|
|
|
|
.SH FILES
|
|
|
|
|
.B
|
|
|
|
|
遵循 No UFO(Unidentified File Objects)原则:https://www.yuque.com/ccmywish/blog/no-ufo
|
|
|
|
|
.PP
|
|
|
|
|
因此不会有任何文件存放在你的计算机中!
|
|
|
|
|
|
2024-08-21 22:27:16 +08:00
|
|
|
|
|
|
|
|
|
|
2024-08-21 20:13:29 +08:00
|
|
|
|
.\" .SH SEE ALSO
|
|
|
|
|
|
|
|
|
|
.SH AUTHOR
|
|
|
|
|
Written by Aoran Zeng, Heng Guo and contributors. (See chsrc.c)
|
|
|
|
|
|
|
|
|
|
.SH "REPORTING BUGS"
|
|
|
|
|
On Gitee: https://gitee.com/RubyMetric/chsrc/issues
|
|
|
|
|
.br
|
|
|
|
|
On GitHub: https://github.com/RubyMetric/chsrc/issues
|
|
|
|
|
|
|
|
|
|
.SH COPYRIGHT
|
|
|
|
|
Copyright (C) 2024 Aoran Zeng, Heng Guo.
|
|
|
|
|
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
|
|
|
|
|
.br
|
|
|
|
|
This is free software: you are free to change and redistribute it.
|
|
|
|
|
There is NO WARRANTY, to the extent permitted by law.
|