From fd820a40c572b02c50046544148175b107693370 Mon Sep 17 00:00:00 2001 From: HawkinC Macbook Date: Wed, 21 May 2025 13:36:29 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=8A=A0=E9=A2=9C=E8=89=B2=EF=BC=8C=E6=9B=B4=E6=96=B0=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E4=B8=AD=E7=9A=84=E5=91=BD=E4=BB=A4=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config-os-and-apps.sh | 14 ++++++-------- readme.md | 11 ++++------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/config-os-and-apps.sh b/config-os-and-apps.sh index 32ab0d5..7d64fc1 100644 --- a/config-os-and-apps.sh +++ b/config-os-and-apps.sh @@ -46,16 +46,15 @@ test -f "$HOME"/.config/.bin/.Runtime/SELF_MARK_AS_INSTALLED_FROM_SCRIPT && { # 克隆,如果失败则退出并恢复原有配置 git clone --depth 1 --branch "$BRANCH" --single-branch https://gitea.yever.top/Hawkin/.config.git "$HOME"/.config test $? -ne 0 && { - echo "git clone failed, please check your network." - # 删除克隆的目录 - echo "delete the unfinished clone dir: $HOME/.config" + echo -e "\033[031mgit clone failed, please check your network.\033[0m" + # 删除克隆的目录,恢复原有配置 + echo -e "\033[034mdelete the unfinished clone dir: $HOME/.config" [ -d "$HOME/.config" ] && rm -rf "$HOME/.config" - # 恢复原有配置 if test -d /tmp/.config; then - echo "restoring the old config to $HOME/.config" + echo -e "\033[034mrestoring the old config to $HOME/.config.\033[0m" mv /tmp/.config "$HOME/.config" else - echo "no old config found, skip restore config dir." + echo -e "\033[032mno old config found, skip restore config dir..\033[0m" fi exit 1 } @@ -67,9 +66,8 @@ cat >"$HOME"/.config/.bin/.Runtime/SELF_MARK_AS_INSTALLED_FROM_SCRIPT <