🐛 fix(osx): 优化git检查逻辑,添加安装提示和配置助手
This commit is contained in:
parent
85a0ac5b3e
commit
c29caa2fb6
|
@ -9,10 +9,13 @@ BRANCH="dev"
|
||||||
# INIT=""
|
# INIT=""
|
||||||
|
|
||||||
# 检查是否安装git
|
# 检查是否安装git
|
||||||
command -v git >/dev/null 2>&1 || {
|
if ! command -v git >/dev/null 2>&1; then
|
||||||
echo "git命令未找到,请安装git"
|
echo "git命令未找到,请安装git"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
else
|
||||||
|
echo "git命令已安装,继续执行"
|
||||||
|
git config --global credential.helper store
|
||||||
|
fi
|
||||||
|
|
||||||
# 使用getopts处理参数
|
# 使用getopts处理参数
|
||||||
while getopts ":hib:" opt; do
|
while getopts ":hib:" opt; do
|
||||||
|
|
Loading…
Reference in New Issue