Skip to content

Commit fde3b37

Browse files
committed
Update bootstrap Termux
1 parent 6dcb85a commit fde3b37

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,17 @@ clang -Iinclude -Ilib src/chsrc-main.c -o chsrc
306306
<details>
307307
<summary>Android/Termux</summary>
308308

309+
Termux 中默认无 `Wget`,我们都用 `cURL` 来下载安装
310+
311+
```bash
312+
# arm64/aarch64
313+
curl -L https://gitee.com/RubyMetric/chsrc/releases/download/pre/chsrc-arm64-linux -o chsrc; chmod +x ./chsrc
314+
```
315+
316+
如果你所在的处理器架构没有预编译版本,可以使用 [chsrc-bootstrap]:
317+
309318
```bash
310-
wget -O - https://gitee.com/RubyMetric/chsrc/raw/main/bootstrap/Termux.bash | bash
319+
curl -L https://gitee.com/RubyMetric/chsrc/raw/main/bootstrap/Termux.bash | bash
311320
```
312321

313322
</details>

bootstrap/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
! Contributors : Nul None <[email protected]>
88
! |
99
! Created On : <2025-07-12>
10-
! Last Modified : <2025-07-12>
10+
! Last Modified : <2025-07-22>
1111
! ---------------------------------------------------------- -->
1212

1313
# Bootstrap
1414

1515
```ruby
1616
begin
17-
download_binary_for_my_platform
17+
download_prebuilt_chsrc_binary_for_my_platform
1818
rescue NoReadyMadeBinary => e
1919
bootstrap! e.my_platform
2020
end
@@ -24,7 +24,7 @@ end
2424

2525

2626

27-
## 鸡蛋困境
27+
## 预编译产生的死锁问题
2828

2929
我们支持预编译的操作系统目前只有 `Windows`, `Linux`, `macOS`,支持的架构请参考[项目 README](../README.md)
3030

@@ -36,7 +36,7 @@ end
3636
2. C语言编译器
3737
3. `GNU make``just` (这二者非强制,但是有了更好)
3838

39-
可是如果用户还没有换源,他/她又如何获得上述这些程序呢?**这是一把死锁,导致用户最终回到手动换源的原始农耕时代。这是一个 "鸡蛋问题",到底是先有鸡还是先有蛋?**
39+
可是如果用户还没有换源,他/她又如何获得上述这些程序呢?**这是一把死锁,导致用户最终回到手动换源的原始农耕时代。**
4040

4141
<br>
4242

bootstrap/Termux.bash

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# File Authors : Aoran Zeng <[email protected]>
77
# Contributors : Nul None <[email protected]>
88
# Created On : <2025-07-12>
9-
# Last Modified : <2025-07-12>
9+
# Last Modified : <2025-07-22>
1010
#
1111
# Termux:
1212
#
@@ -24,7 +24,10 @@ bs_echo() {
2424
if command -v termux-change-repo &>/dev/null; then
2525
termux-change-repo
2626
else
27-
# HELP: $PREFIX 有值吗? 是 "/data/data/com.termux/files/usr" 吗?
27+
28+
# $PREFIX 的值为: /data/data/com.termux/files/usr
29+
# 用户主目录 ~ 为: /data/data/com.termux/files/home
30+
2831
# 必要的
2932
sed -i 's@^\(deb.*stable main\)$@#\1\ndeb https://mirrors.cernet.edu.cn/termux/apt/termux-main stable main@' $PREFIX/etc/apt/sources.list
3033
apt update

0 commit comments

Comments
 (0)