Set correct workspace when workspace is not set.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9816 6f19259b-4bc3-4df7-8a09-765794883524
diff --git a/edksetup.bat b/edksetup.bat
index 7c7f52f..3330154 100755
--- a/edksetup.bat
+++ b/edksetup.bat
@@ -30,13 +30,16 @@
pushd .
cd %~dp0
-if defined WORKSPACE (
- if %WORKSPACE% == %CD% (
- @REM workspace is not changed.
- @goto ParseArgs
- )
+if not defined WORKSPACE (
+ @goto SetWorkSpace
)
+if %WORKSPACE% == %CD% (
+ @REM Workspace is not changed.
+ @goto ParseArgs
+)
+
+:SetWorkSpace
@REM set new workspace
@REM clear EFI_SOURCE and EDK_SOURCE for the new workspace
set WORKSPACE=%CD%