summaryrefslogtreecommitdiffstats
path: root/scripts/envsetup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/envsetup.sh')
-rwxr-xr-xscripts/envsetup.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh
index 5adf319..7314111 100755
--- a/scripts/envsetup.sh
+++ b/scripts/envsetup.sh
@@ -1,7 +1,6 @@
1#!/bin/sh 1#!/bin/bash
2 2
3SCRIPT="envsetup.sh" 3SCRIPT="envsetup.sh"
4
5MACHINE=$1 4MACHINE=$1
6 5
7if [ "$#" -lt 1 ]; then 6if [ "$#" -lt 1 ]; then
@@ -32,8 +31,12 @@ if [ $SOURCED -ne 1 ]; then
32 exit -1 31 exit -1
33fi 32fi
34 33
35SCRIPTDIR=$(cd $(dirname $BASH_SOURCE) && pwd -P) 34if [ -n "$ZSH_VERSION" ]; then
36METADIR=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P) 35 SCRIPTDIR=$(cd $(dirname $0) && pwd -P)
36else
37 SCRIPTDIR=$(cd $(dirname $BASH_SOURCE) && pwd -P)
38fi
39METADIR="${SCRIPTDIR}/../.."
37 40
38if [ -e ${BUILDDIR}/conf/local.conf ]; then 41if [ -e ${BUILDDIR}/conf/local.conf ]; then
39 source $METADIR/poky/oe-init-build-env ${BUILDDIR} 42 source $METADIR/poky/oe-init-build-env ${BUILDDIR}