summaryrefslogtreecommitdiffstats
path: root/oe-init-build-env-memres
diff options
context:
space:
mode:
Diffstat (limited to 'oe-init-build-env-memres')
-rwxr-xr-xoe-init-build-env-memres16
1 files changed, 9 insertions, 7 deletions
diff --git a/oe-init-build-env-memres b/oe-init-build-env-memres
index c1dc4fe3ef..092d4fe081 100755
--- a/oe-init-build-env-memres
+++ b/oe-init-build-env-memres
@@ -34,30 +34,32 @@ else
34fi 34fi
35 35
36if [ -n "$BASH_SOURCE" ]; then 36if [ -n "$BASH_SOURCE" ]; then
37 OEROOT="`dirname $BASH_SOURCE`" 37 THIS_SCRIPT=$BASH_SOURCE
38elif [ -n "$ZSH_NAME" ]; then 38elif [ -n "$ZSH_NAME" ]; then
39 OEROOT="`dirname $0`" 39 THIS_SCRIPT=$0
40else 40else
41 OEROOT="`pwd`" 41 THIS_SCRIPT="$(pwd)/oe-init-build-env"
42fi 42fi
43if [ -n "$BBSERVER" ]; then 43if [ -n "$BBSERVER" ]; then
44 unset BBSERVER 44 unset BBSERVER
45fi 45fi
46 46
47THIS_SCRIPT=$OEROOT/oe-init-build-env-memres
48if [ -z "$ZSH_NAME" ] && [ "x$0" = "x$THIS_SCRIPT" ]; then 47if [ -z "$ZSH_NAME" ] && [ "x$0" = "x$THIS_SCRIPT" ]; then
49 echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'" 48 echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'"
50 exit 1 49 exit 1
51fi 50fi
52 51
53OEROOT=`readlink -f "$OEROOT"` 52if [ -z "$OEROOT" ]; then
53 OEROOT=$(dirname "$THIS_SCRIPT")
54 OEROOT=$(readlink -f "$OEROOT")
55fi
56unset THIS_SCRIPT
57
54export OEROOT 58export OEROOT
55. $OEROOT/scripts/oe-buildenv-internal && \ 59. $OEROOT/scripts/oe-buildenv-internal && \
56 $OEROOT/scripts/oe-setup-builddir && \ 60 $OEROOT/scripts/oe-setup-builddir && \
57 [ -n "$BUILDDIR" ] && cd $BUILDDIR 61 [ -n "$BUILDDIR" ] && cd $BUILDDIR
58unset OEROOT 62unset OEROOT
59unset BBPATH
60unset THIS_SCRIPT
61 63
62res=1 64res=1
63if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null ; then 65if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null ; then