X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=edksetup.sh;h=0b7e33fd77769eefa62b30278003ef54830b31ca;hp=39b76e1c2258bc5bec3acc2d505269c4a2eab59e;hb=60050b31bc13cf76685bc25654d5a2d95a9a273f;hpb=729220eacac90990e9145fd129036ffc1488e1eb diff --git a/edksetup.sh b/edksetup.sh index 39b76e1c22..0b7e33fd77 100755 --- a/edksetup.sh +++ b/edksetup.sh @@ -30,6 +30,7 @@ function HelpMsg() 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() @@ -44,26 +45,31 @@ 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 "$*"