summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xoe-init-build-env42
1 files changed, 23 insertions, 19 deletions
diff --git a/oe-init-build-env b/oe-init-build-env
index 8ef32f3d55..52495133fd 100755
--- a/oe-init-build-env
+++ b/oe-init-build-env
@@ -25,27 +25,31 @@
25# being sourced. To workaround the shell limitation use "set arg1" prior 25# being sourced. To workaround the shell limitation use "set arg1" prior
26# to sourcing this script. 26# to sourcing this script.
27# 27#
28if [ -z "$ZSH_NAME" ] && [ "x$0" = "x./oe-init-build-env" ]; then 28if [ -n "$BASH_SOURCE" ]; then
29 echo "Error: This script needs to be sourced. Please run as '. ./oe-init-build-env'" 29 OEROOT="`dirname $BASH_SOURCE`"
30elif [ -n "$ZSH_NAME" ]; then
31 OEROOT="`dirname $0`"
30else 32else
31 if [ -n "$BASH_SOURCE" ]; then 33 OEROOT="`pwd`"
32 OEROOT="`dirname $BASH_SOURCE`"
33 elif [ -n "$ZSH_NAME" ]; then
34 OEROOT="`dirname $0`"
35 else
36 OEROOT="`pwd`"
37 fi
38 if [ -n "$BBSERVER" ]; then
39 unset BBSERVER
40 fi
41 OEROOT=`readlink -f "$OEROOT"`
42 export OEROOT
43 . $OEROOT/scripts/oe-buildenv-internal && \
44 $OEROOT/scripts/oe-setup-builddir && \
45 [ -n "$BUILDDIR" ] && cd $BUILDDIR
46 unset OEROOT
47 unset BBPATH
48fi 34fi
35if [ -n "$BBSERVER" ]; then
36 unset BBSERVER
37fi
38THIS_SCRIPT=$OEROOT/oe-init-build-env
39
40if [ -z "$ZSH_NAME" ] && [ "$0" = "$THIS_SCRIPT" ]; then
41 echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'"
42 exit 1
43fi
44
45OEROOT=`readlink -f "$OEROOT"`
46export OEROOT
47. $OEROOT/scripts/oe-buildenv-internal && \
48 $OEROOT/scripts/oe-setup-builddir && \
49 [ -n "$BUILDDIR" ] && cd $BUILDDIR
50unset OEROOT
51unset BBPATH
52unset THIS_SCRIPT
49 53
50# Shutdown any bitbake server if the BBSERVER variable is not set 54# Shutdown any bitbake server if the BBSERVER variable is not set
51if [ -z "$BBSERVER" ] && [ -f bitbake.lock ] ; then 55if [ -z "$BBSERVER" ] && [ -f bitbake.lock ] ; then