]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix indentation in edksetup.sh SetupPython3
authorrebecca@bluestop.org <rebecca@bluestop.org>
Wed, 26 Jun 2019 16:54:56 +0000 (00:54 +0800)
committerLiming Gao <liming.gao@intel.com>
Mon, 1 Jul 2019 03:57:06 +0000 (11:57 +0800)
Signed-off-by: Rebecca Cran <rebecca@bluestop.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
edksetup.sh

index c7b2e1e2010aa46af1332c85281df9d0ca9bf68f..61e988035fc992c32db0de59afdc30e5630d2f76 100755 (executable)
@@ -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()