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>
---
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
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#42864): https://edk2.groups.io/g/devel/message/42864
Mute This Topic: https://groups.io/mt/32211945/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Liming Gao <liming.gao@intel.com> >-----Original Message----- >From: Fan, ZhijuX >Sent: Wednesday, June 26, 2019 12:50 PM >To: devel@edk2.groups.io >Cc: Gao, Liming <liming.gao@intel.com>; Feng, Bob C ><bob.c.feng@intel.com>; rebecca@bluestop.org >Subject: [PATCH V2] 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> >--- >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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#42873): https://edk2.groups.io/g/devel/message/42873 Mute This Topic: https://groups.io/mt/32211945/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.