Bugfix for envsetup.sh script. 13/4413/2
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>
Sat, 5 Dec 2015 12:12:23 +0000 (13:12 +0100)
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>
Sat, 5 Dec 2015 18:21:30 +0000 (19:21 +0100)
A sourced script cannot use exit as it will
terminate the shell session. "return -1"
is not supported due to the negative value.
Use "return 1" instead.

Change-Id: I7452b7939c5c843eaf76b6600e5eb55c06d17668
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
scripts/envsetup.sh

index 27d73a7..d003301 100644 (file)
@@ -2,7 +2,7 @@
 
 if [ -z $1 ]; then
         echo -e "Usage: source envsetup.sh <board/device> [build dir]"
-        return -1
+        return 1
 fi
 
 case "$1" in
@@ -14,7 +14,7 @@ case "$1" in
                         copy_mm_packages $1
                         if [ $? -ne 0 ]; then
                                 echo "Copying gfx drivers and multimedia packages for '$1' failed."
-                                return -1
+                                return 1
                         fi
                 fi