提交 ed7ae471 编写于 作者: J JiabinYang

test=develop, fix mac python check error

上级 a6af3612
...@@ -40,9 +40,11 @@ function checkMacPython2(){ ...@@ -40,9 +40,11 @@ function checkMacPython2(){
else else
python_version="" python_version=""
fi fi
check_python=`echo $python_version | grep "Python 2"`
echo $check_python
if [ "$python_version" == "" ] || [ "$python_root" == "/usr/bin/python" -a "$python_version" == "Python 2.7.10" ] ;then if [ "$python_version" == "" ] || [ "$python_root" == "/usr/bin/python" -a "$python_version" == "Python 2.7.10" ] ;then
python_version="" python_version=""
else elif [ -n "$check_python" ];then
while true while true
do do
read -p "找到:$python_version, 是否使用:(y/n),输入n来输入自定义使用的python路径,或者按ctrl + c退出: " use_python read -p "找到:$python_version, 是否使用:(y/n),输入n来输入自定义使用的python路径,或者按ctrl + c退出: " use_python
...@@ -60,6 +62,9 @@ function checkMacPython2(){ ...@@ -60,6 +62,9 @@ function checkMacPython2(){
if [ "$use_python" == "y" ];then if [ "$use_python" == "y" ];then
break break
fi fi
else
echo "您输入Python的不是Python2"
python_version=""
fi fi
done done
} }
...@@ -77,9 +82,10 @@ function checkMacPython3(){ ...@@ -77,9 +82,10 @@ function checkMacPython3(){
else else
python_version="" python_version=""
fi fi
check_python=`echo $python_version | grep "Python 3"`
if [ "$python_version" == "" ] || [ "$python_root" == "/usr/bin/python" -a "$python_version" == "Python 2.7.10" ] ;then if [ "$python_version" == "" ] || [ "$python_root" == "/usr/bin/python" -a "$python_version" == "Python 2.7.10" ] ;then
python_version="" python_version=""
else elif [ -n "$check_python" ] ;then
while true while true
do do
read -p "找到:$python_version, 是否使用:(y/n),输入n来输入自定义使用的python路径,或者按ctrl + c退出: " use_python read -p "找到:$python_version, 是否使用:(y/n),输入n来输入自定义使用的python路径,或者按ctrl + c退出: " use_python
...@@ -97,6 +103,9 @@ function checkMacPython3(){ ...@@ -97,6 +103,9 @@ function checkMacPython3(){
if [ "$use_python" == "y" ];then if [ "$use_python" == "y" ];then
break break
fi fi
else
echo "您输入Python的不是Python2"
python_version=""
fi fi
done done
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册