From 39744883933eea9674ccaf243cbf565966b8fa74 Mon Sep 17 00:00:00 2001 From: "Fan, ZhijuX" Date: Wed, 26 Jun 2019 12:49:33 +0800 Subject: [PATCH] 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 Cc: Liming Gao Signed-off-by: Zhiju.Fan Reviewed-by: Liming Gao --- edksetup.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/edksetup.sh b/edksetup.sh index 61e988035f..12a3e26a67 100755 --- a/edksetup.sh +++ b/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