From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: bluestop.org, ip: 65.103.231.193, mailfrom: rebecca@bluestop.org) Received: from muon.bluestop.org (muon.bluestop.org [65.103.231.193]) by groups.io with SMTP; Wed, 26 Jun 2019 09:55:12 -0700 Received: from muon.bluestop.org (localhost [127.0.0.1]) by muon.bluestop.org (Postfix) with ESMTP id 836825C56A; Wed, 26 Jun 2019 10:59:35 -0600 (MDT) Received: from muon.bluestop.org ([127.0.0.1]) by muon.bluestop.org (muon.bluestop.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id opp2a8G43k-F; Wed, 26 Jun 2019 10:59:34 -0600 (MDT) Received: from photon.int.bluestop.org (unknown [10.0.10.170]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by muon.bluestop.org (Postfix) with ESMTPSA; Wed, 26 Jun 2019 10:59:34 -0600 (MDT) From: rebecca@bluestop.org To: devel@edk2.groups.io, Bob Feng , Liming Gao , "Zhiju . Fan" Cc: Rebecca Cran Subject: [PATCH] Fix indentation in edksetup.sh SetupPython3 Date: Wed, 26 Jun 2019 10:54:56 -0600 Message-Id: <20190626165456.63388-1-rebecca@bluestop.org> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Signed-off-by: Rebecca Cran --- 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=3D + origin_version=3D + fi + for python in $(whereis python3) + do + python=3D$(echo $python | grep "[[:digit:]]$" || true) + python_version=3D${python##*python} + if [ -z "${python_version}" ] || (! command -v $python >/dev/null 2>= &1);then + continue fi - for python in $(whereis python3) - do - python=3D$(echo $python | grep "[[:digit:]]$" || true) - python_version=3D${python##*python} - if [ -z "${python_version}" ] || (! command -v $python >/dev/null = 2>&1);then - continue - fi - if [ -z $origin_version ];then - origin_version=3D$python_version - export PYTHON_COMMAND=3D$python - continue - fi - ret=3D`echo "$origin_version < $python_version" |bc` - if [ "$ret" -eq 1 ]; then - origin_version=3D$python_version - export PYTHON_COMMAND=3D$python - fi - done - return 0 + if [ -z $origin_version ];then + origin_version=3D$python_version + export PYTHON_COMMAND=3D$python + continue + fi + ret=3D`echo "$origin_version < $python_version" |bc` + if [ "$ret" -eq 1 ]; then + origin_version=3D$python_version + export PYTHON_COMMAND=3D$python + fi + done + return 0 } =20 function SetupPython() --=20 2.22.0