diff options
author | Shaun Taheri <shaun@advancedtelematic.com> | 2017-06-22 14:05:48 +0200 |
---|---|---|
committer | Phil Wise <phil@advancedtelematic.com> | 2017-06-26 16:22:31 +0200 |
commit | 30109fe78e93bf2f88ebe866577bd957af35c98b (patch) | |
tree | a713f01cd701fb36d9185558de82af924eed4c9a /scripts/envsetup.sh | |
parent | 45c155a67d3532ad32342fc512e8bf6341ab9e5d (diff) | |
download | meta-updater-30109fe78e93bf2f88ebe866577bd957af35c98b.tar.gz |
Fix script directory in zsh
Diffstat (limited to 'scripts/envsetup.sh')
-rwxr-xr-x | scripts/envsetup.sh | 11 |
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 | ||
3 | SCRIPT="envsetup.sh" | 3 | SCRIPT="envsetup.sh" |
4 | |||
5 | MACHINE=$1 | 4 | MACHINE=$1 |
6 | 5 | ||
7 | if [ "$#" -lt 1 ]; then | 6 | if [ "$#" -lt 1 ]; then |
@@ -32,8 +31,12 @@ if [ $SOURCED -ne 1 ]; then | |||
32 | exit -1 | 31 | exit -1 |
33 | fi | 32 | fi |
34 | 33 | ||
35 | SCRIPTDIR=$(cd $(dirname $BASH_SOURCE) && pwd -P) | 34 | if [ -n "$ZSH_VERSION" ]; then |
36 | METADIR=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P) | 35 | SCRIPTDIR=$(cd $(dirname $0) && pwd -P) |
36 | else | ||
37 | SCRIPTDIR=$(cd $(dirname $BASH_SOURCE) && pwd -P) | ||
38 | fi | ||
39 | METADIR="${SCRIPTDIR}/../.." | ||
37 | 40 | ||
38 | if [ -e ${BUILDDIR}/conf/local.conf ]; then | 41 | if [ -e ${BUILDDIR}/conf/local.conf ]; then |
39 | source $METADIR/poky/oe-init-build-env ${BUILDDIR} | 42 | source $METADIR/poky/oe-init-build-env ${BUILDDIR} |