public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH V2] BaseTools:Linux changes the way the latest version is judged
@ 2019-06-26  4:49 Fan, ZhijuX
  2019-06-26  7:27 ` Liming Gao
  0 siblings, 1 reply; 2+ messages in thread
From: Fan, ZhijuX @ 2019-06-26  4:49 UTC (permalink / raw)
  To: devel@edk2.groups.io; +Cc: Gao, Liming, Feng, Bob C, rebecca@bluestop.org

[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]

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


[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 3764 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH V2] BaseTools:Linux changes the way the latest version is judged
  2019-06-26  4:49 [PATCH V2] BaseTools:Linux changes the way the latest version is judged Fan, ZhijuX
@ 2019-06-26  7:27 ` Liming Gao
  0 siblings, 0 replies; 2+ messages in thread
From: Liming Gao @ 2019-06-26  7:27 UTC (permalink / raw)
  To: Fan, ZhijuX, devel@edk2.groups.io; +Cc: Feng, Bob C, rebecca@bluestop.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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-26  7:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-26  4:49 [PATCH V2] BaseTools:Linux changes the way the latest version is judged Fan, ZhijuX
2019-06-26  7:27 ` Liming Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox