echo Please note: This script must be \'sourced\' so the environment can be changed.
echo ". edksetup.sh"
echo "source edksetup.sh"
+ return 1
}
function SetupEnv()
function SourceEnv()
{
-if [ \
- "$1" = "-?" -o \
- "$1" = "-h" -o \
- "$1" = "--help" \
- ]
-then
- HelpMsg
- return
-else
- SetupEnv "$*"
-fi
+ if [ \
+ "$1" = "-?" -o \
+ "$1" = "-h" -o \
+ "$1" = "--help" \
+ ]
+ then
+ HelpMsg
+ else
+ SetupEnv "$*"
+ fi
}
-if [ $# -gt 1 ]
+
+if [ $# -gt 1 ]
then
HelpMsg
- return
-elif [ $# -eq 1 ] && [ "$1" != "BaseTool" ]
+elif [ $# -eq 1 ] && [ "$1" != "BaseTools" ]
then
HelpMsg
- return
-fi
+fi
+
+RETVAL=$?
+if [ $RETVAL -ne 0 ]
+then
+ return $RETVAL
+fi
+
SourceEnv "$*"