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 <