From 4b00d9c45a17450cd26d243671c1d37935792aae Mon Sep 17 00:00:00 2001 From: mini2024 Date: Tue, 11 Mar 2025 22:25:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96=E7=B3=BB=E7=BB=9F=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=A3=80=E6=B5=8B=E9=80=BB=E8=BE=91=EF=BC=8C=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E5=86=97=E4=BD=99=E7=9A=84=E7=B3=BB=E7=BB=9F=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=88=A4=E6=96=AD=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/1.sh b/1.sh index 0e1ef4f..88f4a42 100644 --- a/1.sh +++ b/1.sh @@ -11,19 +11,11 @@ trap 'echo "Error on line $LINENO"' ERR # 先检查是 Debian 还是 Alpine if [ -f /etc/debian_version ]; then SYSTEM_TYPE="debian" + echo "检测到 Debian 系统" elif [ -f /etc/alpine-release ]; then SYSTEM_TYPE="alpine" + echo "检测到 Alpine 系统" else echo "不支持的系统类型" exit 1 fi - -# 检查系统类型 -if [[ $SYSTEM_TYPE == *"Debian"* ]]; then - echo "检测到 Debian 系统" -elif [[ $SYSTEM_TYPE == *"Alpine"* ]]; then - echo "检测到 Alpine 系统" -else - echo "不支持的系统类型: $SYSTEM_TYPE" - exit 1 -fi