summaryrefslogtreecommitdiffstats
path: root/oe-init-build-env-memres
diff options
context:
space:
mode:
authorEsquivel, Benjamin <benjamin.esquivel@intel.com>2015-03-19 20:31:41 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-20 10:56:03 +0000
commit61e14ad4ebde3508db1ab0a70e77677d8aa571c6 (patch)
treeacae6f08ddd7c9af4af0642024c98a52dbbd755b /oe-init-build-env-memres
parent0308f3101b93035ebf564a33acb00adaac108033 (diff)
downloadpoky-61e14ad4ebde3508db1ab0a70e77677d8aa571c6.tar.gz
oe-init-build-env-memres: Fix source check
The source check was referring to oe-init-build-env instead of the memres. It could be executed without the proper failure message and the corresponding exit command out of the script. This commit makes the memres script look more like the oe-init-build-env with the correct script name. [YOCTO #7487] (From OE-Core rev: 1666b41e73f2aa7bd736c3e9bf3797946bff61b5) Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'oe-init-build-env-memres')
-rwxr-xr-xoe-init-build-env-memres45
1 files changed, 25 insertions, 20 deletions
diff --git a/oe-init-build-env-memres b/oe-init-build-env-memres
index 9b9e0f44b0..c1dc4fe3ef 100755
--- a/oe-init-build-env-memres
+++ b/oe-init-build-env-memres
@@ -32,28 +32,33 @@ else
32 port=$1 32 port=$1
33 shift 33 shift
34fi 34fi
35if [ -z "$ZSH_NAME" ] && [ "x$0" = "x./oe-init-build-env" ]; then 35
36 echo "Error: This script needs to be sourced. Please run as '. ./oe-init-build-env'" 36if [ -n "$BASH_SOURCE" ]; then
37 OEROOT="`dirname $BASH_SOURCE`"
38elif [ -n "$ZSH_NAME" ]; then
39 OEROOT="`dirname $0`"
37else 40else
38 if [ -n "$BASH_SOURCE" ]; then 41 OEROOT="`pwd`"
39 OEROOT="`dirname $BASH_SOURCE`" 42fi
40 elif [ -n "$ZSH_NAME" ]; then 43if [ -n "$BBSERVER" ]; then
41 OEROOT="`dirname $0`" 44 unset BBSERVER
42 else 45fi
43 OEROOT="`pwd`" 46
44 fi 47THIS_SCRIPT=$OEROOT/oe-init-build-env-memres
45 if [ -n "$BBSERVER" ]; then 48if [ -z "$ZSH_NAME" ] && [ "x$0" = "x$THIS_SCRIPT" ]; then
46 unset BBSERVER 49 echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'"
47 fi 50 exit 1
48
49 OEROOT=`readlink -f "$OEROOT"`
50 export OEROOT
51 . $OEROOT/scripts/oe-buildenv-internal && \
52 $OEROOT/scripts/oe-setup-builddir && \
53 [ -n "$BUILDDIR" ] && cd $BUILDDIR
54 unset OEROOT
55 unset BBPATH
56fi 51fi
52
53OEROOT=`readlink -f "$OEROOT"`
54export OEROOT
55. $OEROOT/scripts/oe-buildenv-internal && \
56 $OEROOT/scripts/oe-setup-builddir && \
57 [ -n "$BUILDDIR" ] && cd $BUILDDIR
58unset OEROOT
59unset BBPATH
60unset THIS_SCRIPT
61
57res=1 62res=1
58if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null ; then 63if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null ; then
59 BBSERVER=`cat bitbake.lock` bitbake --status-only 64 BBSERVER=`cat bitbake.lock` bitbake --status-only