Fix indentation in edksetup.sh SetupPython3

Signed-off-by: Rebecca Cran <rebecca@bluestop.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
rebecca@bluestop.org 2019-06-27 00:54:56 +08:00 committed by Liming Gao
parent adec1f5deb
commit aecad6c1cb
1 changed files with 20 additions and 20 deletions

View File

@ -108,27 +108,27 @@ function SetupEnv()
function SetupPython3() function SetupPython3()
{ {
if [ $origin_version ];then if [ $origin_version ];then
origin_version= origin_version=
fi
for python in $(whereis python3)
do
python=$(echo $python | grep "[[:digit:]]$" || true)
python_version=${python##*python}
if [ -z "${python_version}" ] || (! command -v $python >/dev/null 2>&1);then
continue
fi fi
for python in $(whereis python3) if [ -z $origin_version ];then
do origin_version=$python_version
python=$(echo $python | grep "[[:digit:]]$" || true) export PYTHON_COMMAND=$python
python_version=${python##*python} continue
if [ -z "${python_version}" ] || (! command -v $python >/dev/null 2>&1);then fi
continue ret=`echo "$origin_version < $python_version" |bc`
fi if [ "$ret" -eq 1 ]; then
if [ -z $origin_version ];then origin_version=$python_version
origin_version=$python_version export PYTHON_COMMAND=$python
export PYTHON_COMMAND=$python fi
continue done
fi return 0
ret=`echo "$origin_version < $python_version" |bc`
if [ "$ret" -eq 1 ]; then
origin_version=$python_version
export PYTHON_COMMAND=$python
fi
done
return 0
} }
function SetupPython() function SetupPython()