From nobody Fri May 17 09:18:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+87045+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87045+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1646028076; cv=none; d=zohomail.com; s=zohoarc; b=an9Xitq3GgwylTSitxb2x7qnvwaRWfQDBKlCjYNt6TEfbqTCLm7YChV4o+sC2SQHM/2wE0Ni2n8rFCIQIzFw3ogAZ5ES52kDVJwhW73ye0jRCTC5h3OsxhfCOFcZ8MuOhAsJemn1M1ySX2bihCiG+puVXBqhKmuFsNJHYR36xS0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1646028076; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=Sl6qZmeBGBeqoVSk6oyDqHH7OqFeWiw7X5dYLEJr8SE=; b=c6JRFL9Bhj/wtZrkYIYNm27YsCPO4ekdY75dmRM5i7G4RsT58rK4BzTRK3yQO8HOIzT4AW6i4LnTG6a+a3A+HK5sHijw/lpLhWjukrhlq1BLIeck96pGWWg5sY9wNQgePyRzsCh5R6OcFbbYCG0nysb71a1dfqFwUktE4FdrLT8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87045+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1646028076222396.3498485930578; Sun, 27 Feb 2022 22:01:16 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id fwONYY1788612xvwKrKFpx7X; Sun, 27 Feb 2022 22:01:15 -0800 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web11.17245.1646028073775991351 for ; Sun, 27 Feb 2022 22:01:14 -0800 X-IronPort-AV: E=McAfee;i="6200,9189,10271"; a="313530157" X-IronPort-AV: E=Sophos;i="5.90,142,1643702400"; d="scan'208";a="313530157" X-Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2022 22:00:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,142,1643702400"; d="scan'208";a="544633151" X-Received: from yuweipc.ccr.corp.intel.com ([10.239.158.34]) by fmsmga007.fm.intel.com with ESMTP; 27 Feb 2022 22:00:48 -0800 From: "Yuwei Chen" To: devel@edk2.groups.io Cc: MingYue Liang , Bob Feng , Liming Gao Subject: [edk2-devel] [PATCH] BaseTools: Add BaseTools/Scripts to path. Date: Mon, 28 Feb 2022 14:00:40 +0800 Message-Id: <20220228060040.93-1-yuwei.chen@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,yuwei.chen@intel.com X-Gm-Message-State: njFVwQW9CKRDuengebjBqeyOx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1646028075; bh=MQzC1hAiIeswN7n+Viil5QG3A2/y0MCgHxXJZFsEE20=; h=Cc:Date:From:Reply-To:Subject:To; b=KeofdZfvEEmcjQa0GsvbYO5XQLhB3rI2/eZZq3wdzI3C2uPypd1/MlNFjY8ZrcmGWaF 475O9K9LDYmpVwfwhd0KIkZ0QHg5K35CgcbTg2VoR2OProdShqsDx+Ye0q8N1JXC4Jo1m 7GPxOvDOyhP6YemUUjpBxqzmlRoJCVX0lj4= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1646028077589100001 Content-Type: text/plain; charset="utf-8" From: MingYue Liang REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2859 I'd like to add a git command extension to add a platform scoped git grep. It turns out if you have git- in your path git will find you extension. This patch adds basetools/scripts to the path in both windows and Linux systems. Signed-off-by: Mingyue Liang Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen --- BaseTools/BuildEnv | 24 +++++++++++++++++++++--- BaseTools/toolsetup.bat | 6 ++++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/BaseTools/BuildEnv b/BaseTools/BuildEnv index 275f4c5901..cdee304aee 100755 --- a/BaseTools/BuildEnv +++ b/BaseTools/BuildEnv @@ -187,7 +187,6 @@ AddDirToStartOfPath() { } =20 AddEdkToolsToPath() { - # # If EDK_TOOLS_PATH is not set, then we cannot update PATH # @@ -208,9 +207,21 @@ AddEdkToolsToPath() { AddDirToStartOfPath $EDK_TOOLS_PATH/BinWrappers/PosixLike fi =20 - AddDirToStartOfPath $EDK_TOOLS_PATH_BIN +} =20 +AddEdkToolsScriptsToPath() { + # + # If EDK_TOOLS_PATH is not set, then we cannot update PATH + # + if [ -z "$EDK_TOOLS_PATH" ] + then + return 1 + fi + + echo Add edk2/Basetools/Scripts to path + EDK_TOOLS_SCRIPTS_PATH=3D$EDK_TOOLS_PATH/Scripts + AddDirToStartOfPath $EDK_TOOLS_SCRIPTS_PATH } =20 CopySingleTemplateFile() { @@ -227,7 +238,6 @@ CopySingleTemplateFile() { echo " to $DST_FILENAME" SRC_FILENAME=3D$EDK_TOOLS_PATH/$SRC_FILENAME cp $SRC_FILENAME $DST_FILENAME - } =20 CopyTemplateFiles() { @@ -262,11 +272,19 @@ ScriptMain() { return 1 fi =20 + AddEdkToolsScriptsToPath + if [ $? -ne 0 ] + then + echo "Failure adding EDK Tools Scripts into PATH!" + return 1 + fi + StoreCurrentConfiguration =20 echo WORKSPACE: $WORKSPACE echo EDK_TOOLS_PATH: $EDK_TOOLS_PATH echo CONF_PATH: $CONF_PATH + echo EDK_TOOLS_SCRIPTS_PATH: $EDK_TOOLS_SCRIPTS_PATH =20 CopyTemplateFiles =20 diff --git a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat index 58fd26a4b5..e079a3bb68 100755 --- a/BaseTools/toolsetup.bat +++ b/BaseTools/toolsetup.bat @@ -145,9 +145,15 @@ if /I "%1"=3D=3D"/?" goto Usage ) set PATH=3D%EDK_TOOLS_BIN%;%PATH% set WORKSPACE_TOOLS_PATH=3D%EDK_TOOLS_PATH% + echo Add basetools/scripts to path... + set PATH=3D%BASE_TOOLS_PATH%\Scripts;%PATH% + echo Successfully added basetools/scripts to path goto PATH_ok =20 :check_PATH + echo Add basetools/scripts to path... + set PATH=3D%BASE_TOOLS_PATH%\Scripts;%PATH% + echo Successfully added basetools/scripts to path. if "%EDK_TOOLS_PATH%"=3D=3D"%WORKSPACE_TOOLS_PATH%" goto PATH_ok if not defined EDK_TOOLS_BIN ( set EDK_TOOLS_BIN=3D%EDK_TOOLS_PATH%\Bin\Win32 --=20 2.26.2.windows.1 -=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 (#87045): https://edk2.groups.io/g/devel/message/87045 Mute This Topic: https://groups.io/mt/89445556/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-