Check for the presence of a well-known file in the checkout, in order to detect an incorrect setting of $WORKSPACE.
Only print the new message if sourcing BuildEnv succeeds. Suggested-by: Laszlo Ersek <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Paolo Bonzini <[email protected]> --- This patch is on top of "[PATCH] Look for BuildEnv under EDK_TOOLS_PATH". --- edksetup.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/edksetup.sh b/edksetup.sh index 5b4d37e..6854188 100755 --- a/edksetup.sh +++ b/edksetup.sh @@ -44,6 +44,20 @@ function SetupEnv() else . BaseTools/BuildEnv $* fi + if [ $? -gt 0 ] + then + return 1 + fi + if [ ! -f $WORKSPACE/MdePkg/MdePkg.dsc ] + then + echo + echo WORKSPACE does not point to the top of the edk2 tree. + echo Please ensure that this file is sourced from the top + echo of the tree and that WORKSPACE is not set incorrectly + echo in your shell. + echo + return 1 + fi } function SourceEnv() -- 1.9.3 ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
