2023-09-06 16:13:36 +08:00
|
|
|
|
<div align="center">
|
2024-05-24 16:47:04 +08:00
|
|
|
|
<img alt="chsrc logo" src="image/chsrc.png"/>
|
2023-09-06 16:13:36 +08:00
|
|
|
|
</div>
|
2023-08-28 21:50:44 +08:00
|
|
|
|
|
2024-09-05 18:29:28 +08:00
|
|
|
|
全平台命令行换源工具,**目标支持 Linux, Windows (MSYS2, Cygwin), macOS, BSD 等尽可能多的操作系统环境,龙芯、飞腾、RISC-V 等尽可能多的 CPU**。
|
2024-06-09 14:23:23 +08:00
|
|
|
|
|
|
|
|
|
我们使用 **C99** 来完成上述目标。我们并不使用 Python 或 JS 等解释语言,因为一个简单的换源工具,不应该强行塞给用户一个庞大的解释器和数十、数百 MB 其他文件。
|
2023-08-30 10:06:37 +08:00
|
|
|
|
|
2024-06-09 14:34:57 +08:00
|
|
|
|
本软件为**自由软件**,SDPX 软件许可证为 `GPL-3.0-or-later and MIT`
|
2023-09-04 22:19:07 +08:00
|
|
|
|
|
2024-09-05 00:53:12 +08:00
|
|
|
|
<a href="https://hellogithub.com/repository/7666ba91e01e4a59be5809b02d9e8ff6" target="_blank"><img src="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=7666ba91e01e4a59be5809b02d9e8ff6&claim_uid=H6YVMUy7ulev8R4&theme=dark" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
|
|
|
|
|
2023-09-04 22:19:07 +08:00
|
|
|
|
<br>
|
|
|
|
|
|
2024-08-22 20:16:28 +08:00
|
|
|
|
## 🤝 贡献
|
2024-08-19 14:30:04 +08:00
|
|
|
|
|
|
|
|
|
> [!TIP]
|
|
|
|
|
> **`chsrc` 不仅是一个命令行工具,同时也是一个换源框架,它甚至使你能够在不了解C语言的情况下编写出新的换源方法(recipe)。**
|
|
|
|
|
|
|
|
|
|
立刻为一个新软件添加换源方法![Write A Recipe Even If You Don't Know C](./doc/Write-A-Recipe-Even-If-You-Dont-Know-C.md)
|
|
|
|
|
|
2024-08-19 15:34:50 +08:00
|
|
|
|
- 案例:[Armbian](./src/recipe/os/APT/Armbian.c)
|
2024-08-19 14:55:30 +08:00
|
|
|
|
- 挑战:[CentOS (Stream) Recipe Challenge!](https://github.com/RubyMetric/chsrc/issues/48)
|
2024-08-19 14:30:04 +08:00
|
|
|
|
|
2024-08-22 20:16:28 +08:00
|
|
|
|
<br>
|
2024-08-19 14:30:04 +08:00
|
|
|
|
|
2024-09-04 12:09:59 +08:00
|
|
|
|
📝 持续关注镜像站可用性的协作:
|
|
|
|
|
|
|
|
|
|
1. https://github.com/RubyMetric/chsrc/wiki
|
|
|
|
|
2. https://github.com/RubyMetric/chsrc/discussions
|
|
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
2024-09-10 19:23:55 +08:00
|
|
|
|
想通过 `flatpak`,`snap`,`pacman`,`apt`,`dnf` 等系统包管理工具来安装和更新`chsrc`?若您可提供维护,请访问 [issue#16 on GitHub](https://github.com/RubyMetric/chsrc/issues/16)
|
2024-08-19 14:30:04 +08:00
|
|
|
|
|
2024-08-19 14:55:30 +08:00
|
|
|
|
- [x] `Homebrew`
|
|
|
|
|
- [x] `Scoop`
|
2024-08-29 16:19:53 +08:00
|
|
|
|
- [x] `AUR`
|
2024-08-29 16:30:14 +08:00
|
|
|
|
- [ ] `Flatpak`
|
|
|
|
|
- [ ] `snap`
|
2024-08-19 14:30:04 +08:00
|
|
|
|
- [ ] 缺乏其他平台/包维护者
|
|
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
2024-07-24 17:43:12 +08:00
|
|
|
|
## 📌 示例
|
2024-05-26 00:38:05 +08:00
|
|
|
|
|
|
|
|
|
<div align="center">
|
2024-08-23 16:55:27 +08:00
|
|
|
|
<img alt="chsrc set node" src="image/example-node.png"/>
|
|
|
|
|
<br>
|
|
|
|
|
<img alt="chsrc ls -en ruby" src="image/example-ls-ruby.png"/>
|
2024-05-26 00:38:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
2024-07-24 17:43:12 +08:00
|
|
|
|
## 🚀 安装
|
2024-07-24 16:49:30 +08:00
|
|
|
|
|
|
|
|
|
<a href="https://repology.org/project/chsrc/versions">
|
|
|
|
|
<img src="https://repology.org/badge/vertical-allrepos/chsrc.svg" alt="Packaging status" align="right">
|
|
|
|
|
</a>
|
2024-06-05 17:56:35 +08:00
|
|
|
|
|
2024-08-19 14:30:04 +08:00
|
|
|
|
> [!IMPORTANT]
|
2024-07-24 17:43:12 +08:00
|
|
|
|
> 若通过下述手动方式安装,则会下载到当前目录,可直接通过 `./chsrc` 运行
|
2024-06-05 17:56:35 +08:00
|
|
|
|
|
2024-07-24 17:17:02 +08:00
|
|
|
|
<details>
|
|
|
|
|
<summary>Windows</summary>
|
2023-09-04 10:14:12 +08:00
|
|
|
|
|
2024-07-24 17:43:12 +08:00
|
|
|
|
- 可通过 `scoop` 安装,感谢 [@Gn3po4g](https://github.com/Gn3po4g) 与 [@niheaven](https://github.com/niheaven)
|
2024-07-03 14:09:33 +08:00
|
|
|
|
|
2024-07-24 16:49:30 +08:00
|
|
|
|
```bash
|
|
|
|
|
$ scoop install chsrc
|
|
|
|
|
```
|
2024-05-24 20:43:03 +08:00
|
|
|
|
|
2024-07-24 17:43:12 +08:00
|
|
|
|
- 或手动下载二进制文件,这是最新版,往往比 `scoop` 提供的更新,适用于修复 Bug、添加新功能后及时使用,以及未安装 `scoop` 时
|
2023-09-09 17:42:07 +08:00
|
|
|
|
|
|
|
|
|
```bash
|
2023-09-09 22:10:04 +08:00
|
|
|
|
# x64
|
2024-06-11 22:47:27 +08:00
|
|
|
|
curl -L https://gitee.com/RubyMetric/chsrc/releases/download/pre/chsrc-x64-windows.exe -o chsrc.exe
|
2023-09-09 22:10:04 +08:00
|
|
|
|
|
|
|
|
|
# x86
|
2024-06-11 22:47:27 +08:00
|
|
|
|
curl -L https://gitee.com/RubyMetric/chsrc/releases/download/pre/chsrc-x86-windows.exe -o chsrc.exe
|
2023-09-09 22:10:04 +08:00
|
|
|
|
```
|
2024-07-24 17:17:02 +08:00
|
|
|
|
</details>
|
2023-09-09 22:10:04 +08:00
|
|
|
|
|
2024-07-24 17:17:02 +08:00
|
|
|
|
<details>
|
|
|
|
|
<summary>Linux</summary>
|
2023-09-09 22:10:04 +08:00
|
|
|
|
|
2024-08-29 16:30:14 +08:00
|
|
|
|
- 支持 `AUR`,可通过 `yay` 安装,感谢 [@Jerry-Terrasse](https://github.com/Jerry-Terrasse)
|
2024-08-29 16:19:53 +08:00
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# AUR
|
2024-09-10 19:23:55 +08:00
|
|
|
|
$ yay -S chsrc-bin # Binary from GitHub Release
|
|
|
|
|
$ yay -S chsrc # Build from GitHub Release
|
|
|
|
|
$ yay -S chsrc-git # Build from the latest main branch (stable)
|
2024-08-29 16:19:53 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
- 手动下载二进制文件安装
|
|
|
|
|
|
2023-09-09 22:10:04 +08:00
|
|
|
|
```bash
|
|
|
|
|
# x64
|
2024-06-11 22:47:27 +08:00
|
|
|
|
curl -L https://gitee.com/RubyMetric/chsrc/releases/download/pre/chsrc-x64-linux -o chsrc; chmod +x ./chsrc
|
2023-09-10 14:37:11 +08:00
|
|
|
|
|
2023-09-18 21:50:11 +08:00
|
|
|
|
# aarch64
|
2024-06-11 22:47:27 +08:00
|
|
|
|
curl -L https://gitee.com/RubyMetric/chsrc/releases/download/pre/chsrc-aarch64-linux -o chsrc; chmod +x ./chsrc
|
2023-09-21 21:37:24 +08:00
|
|
|
|
|
|
|
|
|
# riscv64
|
2024-06-11 22:47:27 +08:00
|
|
|
|
curl -L https://gitee.com/RubyMetric/chsrc/releases/download/pre/chsrc-riscv64-linux -o chsrc; chmod +x ./chsrc
|
2023-09-21 21:37:24 +08:00
|
|
|
|
|
|
|
|
|
# armv7
|
2024-06-11 22:47:27 +08:00
|
|
|
|
curl -L https://gitee.com/RubyMetric/chsrc/releases/download/pre/chsrc-armv7-linux -o chsrc; chmod +x ./chsrc
|
2023-09-09 17:42:07 +08:00
|
|
|
|
```
|
2024-08-29 16:19:53 +08:00
|
|
|
|
|
2024-07-24 17:17:02 +08:00
|
|
|
|
</details>
|
2023-09-09 17:42:07 +08:00
|
|
|
|
|
2024-07-24 17:17:02 +08:00
|
|
|
|
<details>
|
|
|
|
|
<summary>macOS</summary>
|
2023-09-15 09:39:40 +08:00
|
|
|
|
|
2024-07-24 17:43:12 +08:00
|
|
|
|
- 可通过 `homebrew` 安装,感谢 [@Aaron-212](https://github.com/Aaron-212) 与 [@chenrui333](https://github.com/chenrui333)
|
2024-06-09 15:37:03 +08:00
|
|
|
|
|
|
|
|
|
```bash
|
2024-07-24 16:49:30 +08:00
|
|
|
|
$ brew install chsrc
|
2024-06-09 15:37:03 +08:00
|
|
|
|
```
|
|
|
|
|
|
2024-07-24 17:43:12 +08:00
|
|
|
|
- 或手动下载二进制文件,这是最新版,往往比 `homebrew` 提供的更新,适用于修复 Bug、添加新功能后及时使用
|
2024-06-09 15:37:03 +08:00
|
|
|
|
|
2023-09-15 09:39:40 +08:00
|
|
|
|
```bash
|
2024-07-24 16:49:30 +08:00
|
|
|
|
# arm/aarch64
|
2024-06-11 22:47:27 +08:00
|
|
|
|
curl -L https://gitee.com/RubyMetric/chsrc/releases/download/pre/chsrc-aarch64-macos -o chsrc; chmod +x ./chsrc
|
2024-06-08 17:59:56 +08:00
|
|
|
|
|
2023-09-15 09:39:40 +08:00
|
|
|
|
# x64
|
2024-06-11 22:47:27 +08:00
|
|
|
|
curl -L https://gitee.com/RubyMetric/chsrc/releases/download/pre/chsrc-x64-macos -o chsrc; chmod +x ./chsrc
|
2023-09-15 09:39:40 +08:00
|
|
|
|
```
|
2024-07-24 17:17:02 +08:00
|
|
|
|
</details>
|
2023-09-15 09:39:40 +08:00
|
|
|
|
|
2024-07-24 17:17:02 +08:00
|
|
|
|
<details>
|
|
|
|
|
<summary>BSD</summary>
|
2023-09-29 22:19:46 +08:00
|
|
|
|
|
|
|
|
|
```bash
|
2024-09-10 19:23:55 +08:00
|
|
|
|
$ git clone https://gitee.com/RubyMetric/chsrc.git; cd chsrc
|
|
|
|
|
$ clang -Iinclude src/chsrc-main.c -o chsrc
|
2023-09-29 22:19:46 +08:00
|
|
|
|
```
|
2024-07-24 17:17:02 +08:00
|
|
|
|
</details>
|
2023-09-29 22:19:46 +08:00
|
|
|
|
|
2024-07-24 17:17:02 +08:00
|
|
|
|
<details>
|
|
|
|
|
<summary>其他平台</summary>
|
2023-09-16 21:00:50 +08:00
|
|
|
|
|
|
|
|
|
```bash
|
2024-09-10 19:23:55 +08:00
|
|
|
|
$ git clone https://gitee.com/RubyMetric/chsrc.git; cd chsrc; gmake
|
2023-09-16 21:00:50 +08:00
|
|
|
|
```
|
2024-07-24 17:17:02 +08:00
|
|
|
|
</details>
|
2023-09-16 21:00:50 +08:00
|
|
|
|
|
2023-09-09 17:42:07 +08:00
|
|
|
|
<br>
|
|
|
|
|
|
2024-07-24 17:43:12 +08:00
|
|
|
|
## 💡 使用
|
2023-09-09 22:10:04 +08:00
|
|
|
|
|
2023-08-30 23:13:30 +08:00
|
|
|
|
```bash
|
2024-06-05 13:51:24 +08:00
|
|
|
|
使用: chsrc <command> [options] [target] [mirror]
|
2023-09-01 17:45:48 +08:00
|
|
|
|
|
2024-06-14 17:03:01 +08:00
|
|
|
|
help # 打印此帮助,或 h, -h, --help
|
|
|
|
|
issue # 查看相关issue
|
2024-08-18 10:03:00 +08:00
|
|
|
|
|
|
|
|
|
list (或 ls, 或 l) # 列出可用镜像源,和可换源目标
|
|
|
|
|
list mirror/target # 列出可用镜像源,或可换源目标
|
2024-06-14 17:03:01 +08:00
|
|
|
|
list os/lang/ware # 列出可换源的操作系统/编程语言/软件
|
2023-09-03 18:05:15 +08:00
|
|
|
|
|
2024-08-18 10:03:00 +08:00
|
|
|
|
measure <target> # 对该目标所有源测速
|
|
|
|
|
cesu <target>
|
|
|
|
|
|
|
|
|
|
list <target> # 查看该目标可用源与支持功能
|
|
|
|
|
get <target> # 查看该目标当前源的使用情况
|
2023-09-03 18:05:15 +08:00
|
|
|
|
|
2024-06-14 17:03:01 +08:00
|
|
|
|
set <target> # 换源,自动测速后挑选最快源
|
|
|
|
|
set <target> first # 换源,使用维护团队测速第一的源
|
|
|
|
|
set <target> <mirror> # 换源,指定使用某镜像站 (通过list命令查看)
|
2024-08-18 10:03:00 +08:00
|
|
|
|
set <target> https://url # 换源,用户自定义源URL
|
2024-06-14 17:03:01 +08:00
|
|
|
|
reset <target> # 重置,使用上游默认使用的源
|
2024-06-05 13:51:24 +08:00
|
|
|
|
|
|
|
|
|
选项:
|
2024-08-09 03:31:55 +08:00
|
|
|
|
-dry # Dry Run,模拟换源过程,命令仅打印并不运行
|
2024-09-04 12:09:59 +08:00
|
|
|
|
-para(llel) # 并行测速 (默认的顺序测速更有参考意义)
|
2024-06-14 17:03:01 +08:00
|
|
|
|
-local # 仅对某项目而非全局换源 (仅部分软件如bundler,pdm支持)
|
2024-09-04 12:09:59 +08:00
|
|
|
|
-ipv6 # 使用IPv6测速
|
2024-08-22 22:29:44 +08:00
|
|
|
|
-en(glish) # 使用英文输出
|
2024-08-23 08:16:02 +08:00
|
|
|
|
-no-color # 无颜色输出
|
2023-08-30 23:13:30 +08:00
|
|
|
|
```
|
2023-08-29 16:02:44 +08:00
|
|
|
|
|
2024-06-14 17:03:01 +08:00
|
|
|
|
当你**不想自动测速的时候**,你可以直接指定某镜像站,源URL,以及指定维护团队已测试的最快镜像站。
|
2023-09-16 22:15:43 +08:00
|
|
|
|
|
|
|
|
|
```bash
|
2023-09-18 21:50:11 +08:00
|
|
|
|
chsrc set ruby # 测速,寻找最快者,换源
|
2023-09-16 22:15:43 +08:00
|
|
|
|
# 或
|
2023-09-18 21:50:11 +08:00
|
|
|
|
chsrc ls ruby # 列出可用的镜像站
|
2023-09-16 22:15:43 +08:00
|
|
|
|
chsrc set ruby rubychina # 使用 RubyChina 作为镜像站
|
2024-06-14 17:03:01 +08:00
|
|
|
|
# 或您有自己的镜像地址
|
|
|
|
|
chsrc set ruby https://gems.ruby-china.com/ # 使用自定义URL
|
2024-06-05 15:07:13 +08:00
|
|
|
|
# 或
|
|
|
|
|
chsrc set ruby first # 使用维护团队测试的最快镜像站
|
2023-09-16 22:15:43 +08:00
|
|
|
|
```
|
|
|
|
|
|
2024-08-17 07:11:11 +08:00
|
|
|
|
对支持 **项目级** 换源的目标,可以避免全局(**系统级** 或 **用户级**)换源。
|
2024-06-09 14:23:23 +08:00
|
|
|
|
|
2024-06-05 13:51:24 +08:00
|
|
|
|
```bash
|
|
|
|
|
chsrc set -local bundler
|
|
|
|
|
chsrc set -local pdm
|
|
|
|
|
```
|
|
|
|
|
|
2023-09-05 14:17:31 +08:00
|
|
|
|
<br>
|
|
|
|
|
|
2023-09-04 10:14:12 +08:00
|
|
|
|
## 编程语言开发
|
|
|
|
|
|
2023-09-05 11:17:02 +08:00
|
|
|
|
```bash
|
2024-09-14 01:44:00 +08:00
|
|
|
|
chsrc set ruby|rb|gem|bundler|rubygems
|
2024-09-10 19:23:55 +08:00
|
|
|
|
|
2024-09-14 01:44:00 +08:00
|
|
|
|
chsrc set python|py|pypi # 同时换 pip、poetry 和 pdm 这3个包管理器,也可以3个独立换源
|
|
|
|
|
chsrc set pip
|
|
|
|
|
chsrc set poetry
|
|
|
|
|
chsrc set pdm
|
|
|
|
|
|
|
|
|
|
chsrc set node|nodejs # 同时换 npm, yarn 和 pnpm 3个,也可以3个独立换源
|
2024-09-10 19:23:55 +08:00
|
|
|
|
chsrc set npm
|
|
|
|
|
chsrc set yarn
|
|
|
|
|
chsrc set pnpm
|
|
|
|
|
|
2024-09-14 01:44:00 +08:00
|
|
|
|
chsrc set perl | cpan
|
|
|
|
|
chsrc set php | composer
|
|
|
|
|
chsrc set lua | luarocks
|
2023-09-05 11:17:02 +08:00
|
|
|
|
|
|
|
|
|
chsrc set go
|
2024-09-14 01:44:00 +08:00
|
|
|
|
chsrc set rust | cargo | crate
|
|
|
|
|
chsrc set java | maven | mvn | gradle
|
|
|
|
|
chsrc set clojure | clojars
|
|
|
|
|
chsrc set dart | pub | flutter # 同时会为flutter换源
|
|
|
|
|
chsrc set haskell | hackage/cabal/stack
|
|
|
|
|
chsrc set ocaml | opam
|
2023-09-05 11:17:02 +08:00
|
|
|
|
|
2023-09-05 14:17:31 +08:00
|
|
|
|
# 同时会为 bioconductor 换源
|
2024-09-14 01:44:00 +08:00
|
|
|
|
chsrc set r | cran
|
2023-09-05 11:17:02 +08:00
|
|
|
|
chsrc set julia
|
|
|
|
|
```
|
|
|
|
|
|
2023-09-06 20:16:37 +08:00
|
|
|
|
<br>
|
|
|
|
|
|
2023-09-05 11:17:02 +08:00
|
|
|
|
## 操作系统
|
2023-09-04 10:14:12 +08:00
|
|
|
|
|
2023-09-05 11:17:02 +08:00
|
|
|
|
```bash
|
2023-09-17 10:52:43 +08:00
|
|
|
|
sudo chsrc set ubuntu
|
2024-09-14 01:44:00 +08:00
|
|
|
|
sudo chsrc set linuxmint | mint
|
2023-09-17 10:52:43 +08:00
|
|
|
|
sudo chsrc set debian
|
|
|
|
|
sudo chsrc set fedora
|
2024-09-14 01:44:00 +08:00
|
|
|
|
sudo chsrc set suse | opensuse
|
2023-09-29 20:54:37 +08:00
|
|
|
|
sudo chsrc set kali
|
2024-07-03 14:09:33 +08:00
|
|
|
|
sudo chsrc set arch
|
|
|
|
|
sudo chsrc set archlinuxcn
|
2023-09-17 10:52:43 +08:00
|
|
|
|
sudo chsrc set manjaro
|
|
|
|
|
sudo chsrc set gentoo
|
2024-09-14 01:44:00 +08:00
|
|
|
|
sudo chsrc set rocky | rockylinux
|
|
|
|
|
sudo chsrc set alma | almalinux
|
2023-09-29 20:54:37 +08:00
|
|
|
|
sudo chsrc set alpine
|
2024-09-14 01:44:00 +08:00
|
|
|
|
sudo chsrc set void | voidlinux
|
2023-09-29 22:39:42 +08:00
|
|
|
|
sudo chsrc set solus
|
2024-09-14 01:44:00 +08:00
|
|
|
|
sudo chsrc set ros | ros2
|
2023-09-29 20:54:37 +08:00
|
|
|
|
sudo chsrc set trisquel
|
2024-09-14 01:44:00 +08:00
|
|
|
|
sudo chsrc set lite | linuxlite
|
|
|
|
|
sudo chsrc set raspi | raspberrypi
|
2024-06-21 01:24:46 +08:00
|
|
|
|
sudo chsrc set armbian
|
2024-08-08 19:29:57 +08:00
|
|
|
|
sudo chsrc set openwrt
|
2023-09-04 10:14:12 +08:00
|
|
|
|
|
2024-08-16 03:39:18 +08:00
|
|
|
|
sudo chsrc set openeuler
|
2024-09-14 01:44:00 +08:00
|
|
|
|
sudo chsrc set openanolis | anolis
|
2024-08-16 03:39:18 +08:00
|
|
|
|
sudo chsrc set openkylin
|
2024-06-12 23:20:09 +08:00
|
|
|
|
sudo chsrc set deepin
|
2023-09-06 16:18:57 +08:00
|
|
|
|
|
2024-09-14 01:44:00 +08:00
|
|
|
|
chsrc set msys2 | msys
|
2023-10-04 18:25:44 +08:00
|
|
|
|
|
|
|
|
|
# BSD
|
|
|
|
|
sudo chsrc set freebsd
|
|
|
|
|
sudo chsrc set openbsd
|
|
|
|
|
sudo chsrc set netbsd
|
2023-09-05 11:17:02 +08:00
|
|
|
|
```
|
2023-09-04 10:14:12 +08:00
|
|
|
|
|
2023-09-06 20:16:37 +08:00
|
|
|
|
<br>
|
2023-09-04 10:14:12 +08:00
|
|
|
|
|
|
|
|
|
## 软件
|
|
|
|
|
|
2023-09-10 17:03:36 +08:00
|
|
|
|
```bash
|
2024-06-08 15:40:15 +08:00
|
|
|
|
chsrc set winget
|
2024-09-14 01:44:00 +08:00
|
|
|
|
chsrc set brew | homebrew
|
|
|
|
|
chsrc set cocoapods | cocoa | pod
|
|
|
|
|
chsrc set dockerhub | docker
|
|
|
|
|
chsrc set flathub | flatpak
|
2023-09-22 15:48:31 +08:00
|
|
|
|
chsrc set nix
|
2023-09-11 11:30:38 +08:00
|
|
|
|
chsrc set guix
|
2024-09-14 01:44:00 +08:00
|
|
|
|
chsrc set emacs | elpa
|
|
|
|
|
chsrc set tex | ctan | latex | texlive | miktex
|
|
|
|
|
chsrc set conda | anaconda
|
2023-09-10 17:03:36 +08:00
|
|
|
|
```
|
|
|
|
|
|
2023-08-30 10:06:37 +08:00
|
|
|
|
<br>
|
|
|
|
|
|
2024-07-24 17:43:12 +08:00
|
|
|
|
## 🛠️ 开发
|
2023-08-30 10:06:37 +08:00
|
|
|
|
|
2023-09-06 20:16:37 +08:00
|
|
|
|
请安装好 `gcc`或`clang` 和 `make` 以及 `curl`
|
2023-08-30 10:59:27 +08:00
|
|
|
|
|
2023-08-30 10:06:37 +08:00
|
|
|
|
```bash
|
2023-09-15 12:54:13 +08:00
|
|
|
|
# 使用 dev 分支开发
|
|
|
|
|
git clone https://gitee.com/RubyMetric/chsrc.git -b dev
|
|
|
|
|
|
2023-09-06 20:16:37 +08:00
|
|
|
|
make # 默认使用 cc 编译
|
|
|
|
|
make CC=clang # 使用 clang 编译
|
|
|
|
|
make CC=gcc # 使用 gcc 编译
|
|
|
|
|
|
2024-06-05 13:12:43 +08:00
|
|
|
|
make test # 测试命令
|
|
|
|
|
make test-xy # 测试 xy.h
|
2023-08-30 10:06:37 +08:00
|
|
|
|
make clean
|
|
|
|
|
```
|
2023-09-05 21:20:23 +08:00
|
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
2024-07-24 17:43:12 +08:00
|
|
|
|
## 📝 许可证
|
2024-06-09 14:34:57 +08:00
|
|
|
|
|
|
|
|
|
- `chsrc` 主程序采用 `GPL-3.0-or-later` 许可证,保证该软件的永久自由
|
|
|
|
|
- `xy.h` 使用 `MIT` 许可证,保证该库可以在尽可能多的情况下复用
|
|
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
2024-07-24 17:43:12 +08:00
|
|
|
|
## ❤️ 致谢
|
2023-09-24 20:05:24 +08:00
|
|
|
|
|
2024-08-16 04:48:32 +08:00
|
|
|
|
感谢各个镜像站提供的优质免费镜像服务
|
2024-08-16 21:13:21 +08:00
|
|
|
|
1. [source.h](./include/source.h) 包含了通用的镜像站信息
|
2024-08-16 04:48:32 +08:00
|
|
|
|
2. 各个recipe内部定义的专用镜像站
|
2023-09-24 20:05:24 +08:00
|
|
|
|
|
2024-09-05 00:53:12 +08:00
|
|
|
|
另外特别感谢以下组织或项目:
|
2024-06-09 14:23:23 +08:00
|
|
|
|
|
2023-09-24 20:05:24 +08:00
|
|
|
|
1. [MirrorZ 教育网镜像站](https://help.mirrors.cernet.edu.cn/)
|
|
|
|
|
2. [清华大学 Tuna](https://mirrors.tuna.tsinghua.edu.cn/)
|
2024-09-05 00:53:12 +08:00
|
|
|
|
3. [上海交通大学软件源镜像服务](https://mirrors.sjtug.sjtu.edu.cn/)
|
|
|
|
|
4. [中国科学技术大学 Linux 用户协会](https://github.com/ustclug)
|
|
|
|
|
5. [Thanks Mirror 项目](https://github.com/eryajf/Thanks-Mirror) by [@eryajf](https://github.com/eryajf)
|
2023-09-24 20:05:24 +08:00
|
|
|
|
|
|
|
|
|
<br>
|