Reviewed-by: Yonghong Zhu <yonghong....@intel.com> Best Regards, Zhu Yonghong
-----Original Message----- From: Gao, Liming Sent: Friday, April 08, 2016 3:57 PM To: edk2-devel@lists.01.org Cc: Zhu, Yonghong <yonghong....@intel.com> Subject: [Patch] Update edksetup.bat to check EDK_TOOLS_PATH before set it. If EDK_TOOLS_PATH is set, then not set it again. If EDK_TOOLS_PATH is not set, then set it. Cc: Yonghong Zhu <yonghong....@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming....@intel.com> --- edksetup.bat | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/edksetup.bat b/edksetup.bat index b69bd26..e065b64 100755 --- a/edksetup.bat +++ b/edksetup.bat @@ -1,7 +1,7 @@ @REM @file @REM Windows batch file to setup a WORKSPACE environment @REM -@REM Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> +@REM Copyright (c) 2006 - 2016, Intel Corporation. All rights +reserved.<BR> @REM This program and the accompanying materials @REM are licensed and made available under the terms and conditions of the BSD License @REM which accompanies this distribution. The full text of the license may be found at @@ -100,21 +100,23 @@ shift :no_nt32 if /I "%1"=="NewBuild" shift -if exist %WORKSPACE%\BaseTools ( - set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools -) else ( - if defined PACKAGES_PATH ( - for %%i IN (%PACKAGES_PATH%) DO ( - if exist %%~fi\BaseTools ( - set EDK_TOOLS_PATH=%%~fi\BaseTools - goto checkBaseTools +if not defined EDK_TOOLS_PATH ( + if exist %WORKSPACE%\BaseTools ( + set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools + ) else ( + if defined PACKAGES_PATH ( + for %%i IN (%PACKAGES_PATH%) DO ( + if exist %%~fi\BaseTools ( + set EDK_TOOLS_PATH=%%~fi\BaseTools + goto checkBaseTools + ) ) + ) else ( + echo. + echo !!! ERROR !!! Cannot find BaseTools !!! + echo. + goto BadBaseTools ) - ) else ( - echo. - echo !!! ERROR !!! Cannot find BaseTools !!! - echo. - goto BadBaseTools ) ) if exist %EDK_TOOLS_PATH%\Source set BASE_TOOLS_PATH=%EDK_TOOLS_PATH% -- 2.8.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel