mirror of
https://github.com/RubyMetric/chsrc
synced 2025-07-24 01:09:34 +08:00
Update bootstrap Termux
This commit is contained in:
parent
6dcb85a5f4
commit
fde3b37f01
11
README.md
11
README.md
@ -306,8 +306,17 @@ clang -Iinclude -Ilib src/chsrc-main.c -o chsrc
|
||||
<details>
|
||||
<summary>Android/Termux</summary>
|
||||
|
||||
Termux 中默认无 `Wget`,我们都用 `cURL` 来下载安装
|
||||
|
||||
```bash
|
||||
wget -O - https://gitee.com/RubyMetric/chsrc/raw/main/bootstrap/Termux.bash | bash
|
||||
# arm64/aarch64
|
||||
curl -L https://gitee.com/RubyMetric/chsrc/releases/download/pre/chsrc-arm64-linux -o chsrc; chmod +x ./chsrc
|
||||
```
|
||||
|
||||
如果你所在的处理器架构没有预编译版本,可以使用 [chsrc-bootstrap]:
|
||||
|
||||
```bash
|
||||
curl -L https://gitee.com/RubyMetric/chsrc/raw/main/bootstrap/Termux.bash | bash
|
||||
```
|
||||
|
||||
</details>
|
||||
|
@ -7,14 +7,14 @@
|
||||
! Contributors : Nul None <nul@none.org>
|
||||
! |
|
||||
! Created On : <2025-07-12>
|
||||
! Last Modified : <2025-07-12>
|
||||
! Last Modified : <2025-07-22>
|
||||
! ---------------------------------------------------------- -->
|
||||
|
||||
# Bootstrap
|
||||
|
||||
```ruby
|
||||
begin
|
||||
download_binary_for_my_platform
|
||||
download_prebuilt_chsrc_binary_for_my_platform
|
||||
rescue NoReadyMadeBinary => e
|
||||
bootstrap! e.my_platform
|
||||
end
|
||||
@ -24,7 +24,7 @@ end
|
||||
|
||||
|
||||
|
||||
## 鸡蛋困境
|
||||
## 预编译产生的死锁问题
|
||||
|
||||
我们支持预编译的操作系统目前只有 `Windows`, `Linux`, `macOS`,支持的架构请参考[项目 README](../README.md)
|
||||
|
||||
@ -36,7 +36,7 @@ end
|
||||
2. C语言编译器
|
||||
3. `GNU make` 或 `just` (这二者非强制,但是有了更好)
|
||||
|
||||
可是如果用户还没有换源,他/她又如何获得上述这些程序呢?**这是一把死锁,导致用户最终回到手动换源的原始农耕时代。这是一个 "鸡蛋问题",到底是先有鸡还是先有蛋?**
|
||||
可是如果用户还没有换源,他/她又如何获得上述这些程序呢?**这是一把死锁,导致用户最终回到手动换源的原始农耕时代。**
|
||||
|
||||
<br>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
# File Authors : Aoran Zeng <ccmywish@qq.com>
|
||||
# Contributors : Nul None <nul@none.org>
|
||||
# Created On : <2025-07-12>
|
||||
# Last Modified : <2025-07-12>
|
||||
# Last Modified : <2025-07-22>
|
||||
#
|
||||
# Termux:
|
||||
#
|
||||
@ -24,7 +24,10 @@ bs_echo() {
|
||||
if command -v termux-change-repo &>/dev/null; then
|
||||
termux-change-repo
|
||||
else
|
||||
# HELP: $PREFIX 有值吗? 是 "/data/data/com.termux/files/usr" 吗?
|
||||
|
||||
# $PREFIX 的值为: /data/data/com.termux/files/usr
|
||||
# 用户主目录 ~ 为: /data/data/com.termux/files/home
|
||||
|
||||
# 必要的
|
||||
sed -i 's@^\(deb.*stable main\)$@#\1\ndeb https://mirrors.cernet.edu.cn/termux/apt/termux-main stable main@' $PREFIX/etc/apt/sources.list
|
||||
apt update
|
||||
|
Loading…
x
Reference in New Issue
Block a user