From 1489ef502e078a22f4556a6fd37193ab45fd6ea6 Mon Sep 17 00:00:00 2001 From: mini2024 Date: Sun, 6 Apr 2025 02:20:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=201.sh=20=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E8=BD=AF=E9=93=BE=E6=8E=A5=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E5=89=8D=E7=9A=84=E5=AD=98=E5=9C=A8=E6=80=A7=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=EF=BC=8C=E4=BB=A5=E9=81=BF=E5=85=8D=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E8=BD=AF=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/1.sh b/1.sh index 3c7b513..646d004 100644 --- a/1.sh +++ b/1.sh @@ -130,8 +130,12 @@ EOF # . /etc/bash/bashrc # . /etc/bash/*.sh if [ "$SYSTEM_TYPE" = "alpine" ]; then - ln -s /root/.bashrc /etc/bash/root-bashrc.sh - echo "已创建软链接: /etc/bash/root-bashrc.sh" + if [ ! -e "/etc/bash/root-bashrc.sh" ]; then + ln -s /root/.bashrc /etc/bash/root-bashrc.sh + echo "已创建软链接: /etc/bash/root-bashrc.sh" + else + echo "软链接已存在: /etc/bash/root-bashrc.sh" + fi fi print_yellow "别名配置已完成"