public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] Fix indentation in edksetup.sh SetupPython3
@ 2019-06-26 16:54 rebecca
  2019-06-27  7:37 ` [edk2-devel] " Liming Gao
  0 siblings, 1 reply; 6+ messages in thread
From: rebecca @ 2019-06-26 16:54 UTC (permalink / raw)
  To: devel, Bob Feng, Liming Gao, Zhiju . Fan; +Cc: Rebecca Cran

Signed-off-by: Rebecca Cran <rebecca@bluestop.org>
---
 edksetup.sh | 40 ++++++++++++++++++++--------------------
 1 file 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()
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-07-01  3:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-26 16:54 [PATCH] Fix indentation in edksetup.sh SetupPython3 rebecca
2019-06-27  7:37 ` [edk2-devel] " Liming Gao
2019-06-27 13:05   ` rebecca
2019-06-28  8:04     ` Liming Gao
2019-06-28 15:30       ` rebecca
2019-07-01  3:58         ` Liming Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox