Fix some bugs in edksetup.sh

1, WORKSPACE environment in unix-like system can be obtained automatically as edksetup.bat in window's environment.
2, XMLBEANS_HOME environment in unix-like system should be also check as edksetup.bat in windows's environment.
3, In some unix-like system like darwin's system, system environment should be export to user's environment explicitly, this behavior is different in microsoft windows's platform. 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@849 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2 2006-07-09 17:33:16 +00:00
parent a782876908
commit ace425da36
1 changed files with 13 additions and 4 deletions

View File

@ -11,10 +11,11 @@
# Setup the environment for unix-like systems running a bash-like shell.
# This file must be "sourced" not executed. For example: ". edksetup.sh"
if [ "$WORKSPACE" == "" ]
then
echo "Please set WORKSPACE before sourcing this script."
else
export WORKSPACE=$(pwd)
# In unix-like system, gcc is the compiler for building tools
export TOOL_CHAIN=gcc
if [ "$JAVA_HOME" == "" ]
then
echo "Please set JAVA_HOME before sourcing this script."
@ -22,6 +23,10 @@ else
if [ "$ANT_HOME" == "" ]
then
echo "Please set ANT_HOME before sourcing this script."
else
if [ "$XMLBEANS_HOME" == "" ]
then
echo "Please set XMLBEANS_HOME before sourcing this script."
else
# These should be ok as they are.
@ -29,6 +34,10 @@ export CLASSPATH=$WORKSPACE/Tools/Jars/SurfaceArea.jar:$WORKSPACE/Tools/Jars/fra
export CLASSPATH=$CLASSPATH:$WORKSPACE/Tools/Jars/Common.jar
export FRAMEWORK_TOOLS_PATH=$WORKSPACE/Tools/bin
export PATH=$FRAMEWORK_TOOLS_PATH:$ANT_HOME/bin:$JAVA_HOME/bin:$PATH
# In some unix-like system, following export is to export system's environment to user's environment
export ANT_HOME=$ANT_HOME
export JAVA_HOME=$JAVA_HOME
export XMLBEANS_HOME=$XMLBEANS_HOME
# Handle any particulars down here.
case "`uname`" in