From 0dadd4e6ccfa8e81325592cf4c2d1139848bc77e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E6=AF=9B?= <76248124+erma0@users.noreply.github.com> Date: Tue, 14 Jun 2022 22:55:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E5=88=86=E5=8E=9F=E7=94=9Ftermux?= =?UTF-8?q?=E5=92=8Ctermux=E4=B8=AD=E5=AE=89=E8=A3=85=E7=9A=84Linux?= =?UTF-8?q?=E5=8F=91=E8=A1=8C=E7=89=88=20(#1498)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 检测termux时只看环境变量,以便于区分原生termux和termux中安装的Linux发行版 测试发现${ANDROID_RUNTIME_ROOT}${ANDROID_ROOT}在termux中安装的Linux发行版中仍旧存在,但是发行版中应该不用设置软连接吧 --- shell/share.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/share.sh b/shell/share.sh index e386102b..9f809a86 100755 --- a/shell/share.sh +++ b/shell/share.sh @@ -98,7 +98,7 @@ make_dir() { } detect_termux() { - if [[ ${ANDROID_RUNTIME_ROOT}${ANDROID_ROOT} ]] || [[ $PATH == *com.termux* ]]; then + if [[ $PATH == *com.termux* ]]; then is_termux=1 else is_termux=0