Browse Source

BaseTools:Linux changes the way the latest version is judged

Some Linux servers do not have BC installed,so errors occur.
So the judgment was changed to avoid this error.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Fan, ZhijuX 5 years ago
parent
commit
3974488393
1 changed files with 2 additions and 4 deletions
  1. 2 4
      edksetup.sh

+ 2 - 4
edksetup.sh

@@ -122,8 +122,7 @@ function SetupPython3()
       export PYTHON_COMMAND=$python
       continue
     fi
-    ret=`echo "$origin_version < $python_version" |bc`
-    if [ "$ret" -eq 1 ]; then
+      if [[ "$origin_version" < "$python_version" ]]; then
       origin_version=$python_version
       export PYTHON_COMMAND=$python
     fi
@@ -165,8 +164,7 @@ function SetupPython()
         export PYTHON_COMMAND=$python
         continue
       fi
-      ret=`echo "$origin_version < $python_version" |bc`
-      if [ "$ret" -eq 1 ]; then
+      if [[ "$origin_version" < "$python_version" ]]; then
         origin_version=$python_version
         export PYTHON_COMMAND=$python
       fi