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 --- Change "\<" to "<" and add as two "[]" edksetup.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/edksetup.sh b/edksetup.sh index c7b2e1e201..0723e7b85a 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 -- 2.14.1.windows.1