diff mbox

[edk2] edk2/edksetup.sh patch to solve command line parameter

Message ID 20140130131848.GH11329@bivouac.eciton.net
State New
Headers show

Commit Message

Leif Lindholm Jan. 30, 2014, 1:18 p.m. UTC
On Wed, Jan 29, 2014 at 01:59:58PM -0800, Jordan Justen wrote:
> Whoops. Looks like I also submitted a patch for the
> missing s on BaseTools.
> 
> On 2014-01-29 08:50:50, Leif Lindholm wrote:
> > Actually, there is another issue with the new edksetup.sh - it returns success
> > (0) regardless of whether the executions succeeds or not.
> > 
> > The attached patch resolves both of these issues.
> 
> Could you do add this information into the commit message?
>  
> > Contributed-under: TianoCore Contribution Agreement 1.0
> 
> Could you also add this to the commit message along with
> a Signed-off-by? (See MdePkg/Contributions.txt)

Of course. Updated version attached.

/
    Leif
------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
diff mbox

Patch

>From f15cbde4d459b2859eff3a8d2f62cd41727f886f Mon Sep 17 00:00:00 2001
From: Leif Lindholm <leif.lindholm@linaro.org>
Date: Wed, 29 Jan 2014 16:46:31 +0000
Subject: [PATCH] fixes for new edksetup.sh

This patch fixes a typo and a functional issue in edksetup.sh.

The typo was a check for the string "BaseTool" instead of "BaseTools".

The functional issue was that the script returned success even when
configuration failed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>

---
 edksetup.sh |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/edksetup.sh b/edksetup.sh
index 39b76e1..c1b57d7 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()
@@ -51,7 +52,6 @@  if [ \
    ]
 then
   HelpMsg
-  return
 else
   SetupEnv "$*"
 fi
@@ -59,11 +59,14 @@  fi
 if [ $# -gt 1 ] 
 then
   HelpMsg
-  return
-elif [ $# -eq 1 ] && [ "$1" != "BaseTool" ]
+elif [ $# -eq 1 ] && [ "$1" != "BaseTools" ]
 then
   HelpMsg
-  return
 fi 
+RETVAL=$?
+if [ $RETVAL -ne 0 ]
+then
+  return $RETVAL
+fi
 SourceEnv "$*"
 
-- 
1.7.10.4