Signed-off-by: Rebecca Cran <rebecca@bluestop.org>
---
edksetup.sh | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/edksetup.sh b/edksetup.sh
index c7b2e1e201..61e988035f 100755
--- a/edksetup.sh
+++ b/edksetup.sh
@@ -108,27 +108,27 @@ function SetupEnv()
function SetupPython3()
{
if [ $origin_version ];then
- origin_version=
+ origin_version=
+ fi
+ for python in $(whereis python3)
+ do
+ python=$(echo $python | grep "[[:digit:]]$" || true)
+ python_version=${python##*python}
+ if [ -z "${python_version}" ] || (! command -v $python >/dev/null 2>&1);then
+ continue
fi
- for python in $(whereis python3)
- do
- python=$(echo $python | grep "[[:digit:]]$" || true)
- python_version=${python##*python}
- if [ -z "${python_version}" ] || (! command -v $python >/dev/null 2>&1);then
- continue
- fi
- if [ -z $origin_version ];then
- origin_version=$python_version
- export PYTHON_COMMAND=$python
- continue
- fi
- ret=`echo "$origin_version < $python_version" |bc`
- if [ "$ret" -eq 1 ]; then
- origin_version=$python_version
- export PYTHON_COMMAND=$python
- fi
- done
- return 0
+ if [ -z $origin_version ];then
+ origin_version=$python_version
+ export PYTHON_COMMAND=$python
+ continue
+ fi
+ ret=`echo "$origin_version < $python_version" |bc`
+ if [ "$ret" -eq 1 ]; then
+ origin_version=$python_version
+ export PYTHON_COMMAND=$python
+ fi
+ done
+ return 0
}
function SetupPython()
--
2.22.0
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#42903): https://edk2.groups.io/g/devel/message/42903
Mute This Topic: https://groups.io/mt/32217032/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
So, this is just indentation update. There is no functionality impact. What test have you done? Thanks Liming > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of rebecca@bluestop.org > Sent: Thursday, June 27, 2019 12:55 AM > To: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; Fan, ZhijuX <zhijux.fan@intel.com> > Cc: Rebecca Cran <rebecca@bluestop.org> > Subject: [edk2-devel] [PATCH] Fix indentation in edksetup.sh SetupPython3 > > Signed-off-by: Rebecca Cran <rebecca@bluestop.org> > --- > edksetup.sh | 40 ++++++++++++++++++++-------------------- > 1 file changed, 20 insertions(+), 20 deletions(-) > > diff --git a/edksetup.sh b/edksetup.sh > index c7b2e1e201..61e988035f 100755 > --- a/edksetup.sh > +++ b/edksetup.sh > @@ -108,27 +108,27 @@ function SetupEnv() > function SetupPython3() > { > if [ $origin_version ];then > - origin_version= > + origin_version= > + fi > + for python in $(whereis python3) > + do > + python=$(echo $python | grep "[[:digit:]]$" || true) > + python_version=${python##*python} > + if [ -z "${python_version}" ] || (! command -v $python >/dev/null 2>&1);then > + continue > fi > - for python in $(whereis python3) > - do > - python=$(echo $python | grep "[[:digit:]]$" || true) > - python_version=${python##*python} > - if [ -z "${python_version}" ] || (! command -v $python >/dev/null 2>&1);then > - continue > - fi > - if [ -z $origin_version ];then > - origin_version=$python_version > - export PYTHON_COMMAND=$python > - continue > - fi > - ret=`echo "$origin_version < $python_version" |bc` > - if [ "$ret" -eq 1 ]; then > - origin_version=$python_version > - export PYTHON_COMMAND=$python > - fi > - done > - return 0 > + if [ -z $origin_version ];then > + origin_version=$python_version > + export PYTHON_COMMAND=$python > + continue > + fi > + ret=`echo "$origin_version < $python_version" |bc` > + if [ "$ret" -eq 1 ]; then > + origin_version=$python_version > + export PYTHON_COMMAND=$python > + fi > + done > + return 0 > } > > function SetupPython() > -- > 2.22.0 > > > -=-=-=-=-=-= > Groups.io Links: You receive all messages sent to this group. > > View/Reply Online (#42903): https://edk2.groups.io/g/devel/message/42903 > Mute This Topic: https://groups.io/mt/32217032/1759384 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [liming.gao@intel.com] > -=-=-=-=-=-= -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#42923): https://edk2.groups.io/g/devel/message/42923 Mute This Topic: https://groups.io/mt/32217032/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On 2019-06-27 01:37, Gao, Liming wrote: > So, this is just indentation update. There is no functionality impact. What test have you done? Yes, it's just whitespace changes. I haven't done any tests, since whitespace doesn't affect functionality. Running "git diff -w" confirms there are no functionality changes. -- Rebecca Cran -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#42930): https://edk2.groups.io/g/devel/message/42930 Mute This Topic: https://groups.io/mt/32217032/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
The change is good. Reviewed-by: Liming Gao <liming.gao@intel.com> I suggest you run this script in Linux and double confirm. >-----Original Message----- >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >rebecca@bluestop.org >Sent: Thursday, June 27, 2019 9:05 PM >To: Gao, Liming <liming.gao@intel.com>; devel@edk2.groups.io; Feng, Bob C ><bob.c.feng@intel.com>; Fan, ZhijuX <zhijux.fan@intel.com> >Subject: Re: [edk2-devel] [PATCH] Fix indentation in edksetup.sh >SetupPython3 > >On 2019-06-27 01:37, Gao, Liming wrote: >> So, this is just indentation update. There is no functionality impact. What >test have you done? > > >Yes, it's just whitespace changes. I haven't done any tests, since >whitespace doesn't affect functionality. > >Running "git diff -w" confirms there are no functionality changes. > > >-- >Rebecca Cran > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#42993): https://edk2.groups.io/g/devel/message/42993 Mute This Topic: https://groups.io/mt/32217032/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On 6/28/19 2:04 AM, Liming Gao wrote: > The change is good. Reviewed-by: Liming Gao <liming.gao@intel.com> > > I suggest you run this script in Linux and double confirm. I've tested it on openSUSE Tumbleweed 20190626 and verified it still works, by building OVMF. I tested both with and without PYTHON3_ENABLE=TRUE set. -- Rebecca Cran -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43026): https://edk2.groups.io/g/devel/message/43026 Mute This Topic: https://groups.io/mt/32217032/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Thanks! Push @aecad6c1cb21aee448ce2a0de0913f227a121f85 >-----Original Message----- >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >rebecca@bluestop.org >Sent: Friday, June 28, 2019 11:30 PM >To: devel@edk2.groups.io; Gao, Liming <liming.gao@intel.com>; Feng, Bob C ><bob.c.feng@intel.com>; Fan, ZhijuX <zhijux.fan@intel.com> >Subject: Re: [edk2-devel] [PATCH] Fix indentation in edksetup.sh >SetupPython3 > >On 6/28/19 2:04 AM, Liming Gao wrote: >> The change is good. Reviewed-by: Liming Gao <liming.gao@intel.com> >> >> I suggest you run this script in Linux and double confirm. > > >I've tested it on openSUSE Tumbleweed 20190626 and verified it still >works, by building OVMF. > >I tested both with and without PYTHON3_ENABLE=TRUE set. > > >-- > >Rebecca Cran > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43078): https://edk2.groups.io/g/devel/message/43078 Mute This Topic: https://groups.io/mt/32217032/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.