diff --git a/config-os-and-apps.sh b/config-os-and-apps.sh index 7d64fc1..fda42e7 100644 --- a/config-os-and-apps.sh +++ b/config-os-and-apps.sh @@ -9,10 +9,13 @@ BRANCH="dev" # INIT="" # 检查是否安装git -command -v git >/dev/null 2>&1 || { +if ! command -v git >/dev/null 2>&1; then echo "git命令未找到,请安装git" exit 1 -} +else + echo "git命令已安装,继续执行" + git config --global credential.helper store +fi # 使用getopts处理参数 while getopts ":hib:" opt; do