summaryrefslogtreecommitdiffstats
path: root/scripts/envsetup.sh
diff options
context:
space:
mode:
authorShaun Taheri <shaun@advancedtelematic.com>2017-06-22 14:05:48 +0200
committerPhil Wise <phil@advancedtelematic.com>2017-06-26 16:22:31 +0200
commit30109fe78e93bf2f88ebe866577bd957af35c98b (patch)
treea713f01cd701fb36d9185558de82af924eed4c9a /scripts/envsetup.sh
parent45c155a67d3532ad32342fc512e8bf6341ab9e5d (diff)
downloadmeta-updater-30109fe78e93bf2f88ebe866577bd957af35c98b.tar.gz
Fix script directory in zsh
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}