diff options
author | rebecca@bluestop.org <rebecca@bluestop.org> | 2019-06-27 00:54:56 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2019-07-01 11:57:06 +0800 |
commit | aecad6c1cb21aee448ce2a0de0913f227a121f85 (patch) | |
tree | 13f37e0ad3edc8c1c74ae88a27ad6d642b0cee78 /edksetup.sh | |
parent | adec1f5deb89c68d82598074500006bd575e8f58 (diff) | |
download | edk2-aecad6c1cb21aee448ce2a0de0913f227a121f85.tar.gz edk2-aecad6c1cb21aee448ce2a0de0913f227a121f85.tar.bz2 edk2-aecad6c1cb21aee448ce2a0de0913f227a121f85.zip |
Fix indentation in edksetup.sh SetupPython3
Signed-off-by: Rebecca Cran <rebecca@bluestop.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'edksetup.sh')
-rwxr-xr-x | edksetup.sh | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/edksetup.sh b/edksetup.sh index c7b2e1e201..61e988035f 100755 --- a/edksetup.sh +++ b/edksetup.sh @@ -108,27 +108,27 @@ function SetupEnv() function SetupPython3() { 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 - 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 - if [ -z $origin_version ];then - origin_version=$python_version - export PYTHON_COMMAND=$python - continue - fi - ret=`echo "$origin_version < $python_version" |bc` - if [ "$ret" -eq 1 ]; then - origin_version=$python_version - export PYTHON_COMMAND=$python - fi - done - return 0 + if [ -z $origin_version ];then + origin_version=$python_version + export PYTHON_COMMAND=$python + continue + fi + 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() |