]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools:Linux changes the way the latest version is judged
authorFan, ZhijuX <zhijux.fan@intel.com>
Wed, 26 Jun 2019 04:49:33 +0000 (12:49 +0800)
committerLiming Gao <liming.gao@intel.com>
Mon, 1 Jul 2019 03:57:06 +0000 (11:57 +0800)
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>
edksetup.sh

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