]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/toolsetup.bat: Fix bug caused by 'CONF_PATH' not defined
authorHao Wu <hao.a.wu@intel.com>
Tue, 26 Jul 2016 05:31:20 +0000 (13:31 +0800)
committerHao Wu <hao.a.wu@intel.com>
Tue, 26 Jul 2016 06:10:56 +0000 (14:10 +0800)
In batch script files, setting a variable in an 'if' block will only take
effect after the 'if' block.

This commit fixes the issue of using the variable 'CONF_PATH' right after
it is being set in an 'if' block.

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/toolsetup.bat

index c1ab9bcc8d33b6e7d03a7961f41bf1eeac5fd62b..a64938db609b123824899e56361a77f24e748766 100755 (executable)
@@ -162,14 +162,14 @@ if not defined WORKSPACE (
 \r
 if not defined CONF_PATH (\r
   set CONF_PATH=%WORKSPACE%\Conf\r
+)\r
 \r
-  if NOT exist %CONF_PATH% (\r
-    if defined PACKAGES_PATH (\r
-      for %%i IN (%PACKAGES_PATH%) DO (\r
-        if exist %%~fi\Conf (\r
-          set CONF_PATH=%%i\Conf\r
-          goto CopyConf\r
-        )\r
+if NOT exist %CONF_PATH% (\r
+  if defined PACKAGES_PATH (\r
+    for %%i IN (%PACKAGES_PATH%) DO (\r
+      if exist %%~fi\Conf (\r
+        set CONF_PATH=%%i\Conf\r
+        goto CopyConf\r
       )\r
     )\r
   )\r