From 2599bd2c43326cec92b8ebc51433066e2e1ca95a Mon Sep 17 00:00:00 2001 From: mango Date: Tue, 24 Feb 2026 22:45:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20exec=E6=9B=BF=E6=8D=A2=E8=BF=9B=E7=A8=8B?= =?UTF-8?q?=EF=BC=8C=E5=BD=BB=E5=BA=95=E9=87=8A=E6=94=BEstdin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dd-reinstall.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dd-reinstall.sh b/dd-reinstall.sh index 89b0271..e9711ea 100644 --- a/dd-reinstall.sh +++ b/dd-reinstall.sh @@ -1,18 +1,18 @@ #!/bin/bash # DD 重装系统 - 引导脚本 # 一键: bash <(curl -sL mjjtop.com/dd) -# 下载脚本到本地再执行,避免管道模式 stdin 冲突 +# 下载核心脚本到本地再 exec 执行,彻底释放 stdin -set -e -SCRIPT_URL="https://mjjtop.com/admin/dd-reinstall/raw/branch/main/dd-core.sh" +CORE_URL="https://mjjtop.com/admin/dd-reinstall/raw/branch/main/dd-core.sh" +TMP="/tmp/dd-core-$$.sh" if command -v wget &>/dev/null; then - wget --no-check-certificate -qO /tmp/dd-reinstall.sh "$SCRIPT_URL" + wget --no-check-certificate -qO "$TMP" "$CORE_URL" elif command -v curl &>/dev/null; then - curl -fsSL -o /tmp/dd-reinstall.sh "$SCRIPT_URL" + curl -fsSL -o "$TMP" "$CORE_URL" else echo "错误: 需要 wget 或 curl" && exit 1 fi -chmod +x /tmp/dd-reinstall.sh -bash /tmp/dd-reinstall.sh +chmod +x "$TMP" +exec bash "$TMP"