From nobody Fri May 3 21:28:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+42903+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42903+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1561568113; cv=none; d=zoho.com; s=zohoarc; b=YFT+3h8nCLqh3OA0qHOF97xHQw3gx4f5PMhD/dAOnxfUvrOpJ4oB++oDUPn+5ZjLaA4+a06/sk/AR0FlbcHoJo7J24+cHhBuo5pTZNytTEfn5EXu0zrEaTzM0uASEakksbmKbJtZgu86UBaViLWj7EL28lWyOCYic7GZjBG9NSw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561568113; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=0RhbBgNUHGsAoIkqjOPci1lhDj2Efb6JBwenTZ577Wo=; b=A3xH0soQJqSEXZqHGTYGjPYC0xybQRoQG90Xe0qXestx3nZPOwGR2DQ9kjdEFjqfLBFMoJeGyBk7yySRCtEcsgHL5NuP/SNbfLQrC1wHYfZ5peXU4lWgbKD+uXBn5WuwIPDwybHrQEr3pL+EYiBx+TqXDLyuzs+4SEPk7/ve1Rg= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42903+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561568113371855.8568439303203; Wed, 26 Jun 2019 09:55:13 -0700 (PDT) Return-Path: X-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 X-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) X-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) X-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: [edk2-devel] [PATCH] Fix indentation in edksetup.sh SetupPython3 Date: Wed, 26 Jun 2019 10:54:56 -0600 Message-Id: <20190626165456.63388-1-rebecca@bluestop.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,rebecca@bluestop.org Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561568112; bh=7ykuogkJ1GXpUw7mFbnlTpGQovNni3t3m94ubWrydvE=; h=Cc:Date:From:Reply-To:Subject:To; b=GgeX9r5gyba8UKSwu+qIBOIVgX0tBLqdTw2bgmE0IF3yRyXN7ReGi41r3c6mUOMsT79 Mv/RI01KUWZkhEhq8qLCbrFWn8YnYyA5qdxjPtMLXq3b4c47nIdqJwGhDTYfkQakKNaJ6 aIK8qk+tsWTiVd80E/Vk5EGhmpVRMRme+EU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- 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] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-