From ae3ad40c7594a216234a7865ccabc4b1225d8988 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Sun, 12 Apr 2026 18:10:09 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=BF=AE=E5=A4=8D=E5=9C=A8=20el=20?= =?UTF-8?q?=E7=9A=84=20sh=20=E4=B8=8B=E6=97=A0=E6=B3=95=E8=BF=90=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reinstall.sh b/reinstall.sh index 3246fc9..cc9c0f2 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -33,7 +33,9 @@ export LC_ALL=C export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH # 如果不是 bash 的话,继续执行会有语法错误,因此在这里判断是否 bash -if [ -z "$BASH" ]; then +if [ -z "$BASH" ] || + # el 的 sh 是 bash 运行在 posix 模式,依然有 $BASH 和 $BASH_VERSION + { [ -n "$BASH" ] && [ -n "$POSIXLY_CORRECT" ]; }; then if ! command -v bash >/dev/null; then if [ -f /etc/alpine-release ]; then if ! apk add bash; then