diff options
author | Anders Darander <anders@chargestorm.se> | 2011-06-13 19:26:16 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-14 13:23:50 +0100 |
commit | 993672fa2739794a6dd0dbd7bb232fa60522b897 (patch) | |
tree | d5327a200121bc4c4dfa63ab58d87ac277d8fbc2 /scripts | |
parent | 30558af716833c52ce1eae4c408a6794aad96cb2 (diff) | |
download | openembedded-core-993672fa2739794a6dd0dbd7bb232fa60522b897.tar.gz openembedded-core-993672fa2739794a6dd0dbd7bb232fa60522b897.tar.bz2 openembedded-core-993672fa2739794a6dd0dbd7bb232fa60522b897.zip |
runqemu: take TMPDIR from bitbake
The old standard of using /home/anders/openembedded-core/build/tmp as TMPDIR do not work any longer,
as - is appended to the real TMPDIR. Thus, always take TMPDIR from
bitbake, unless TMPDIR is set in the environment.
Signed-off-by: Anders Darander <anders@chargestorm.se>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/runqemu | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index a09362c6a1..aa44070dbe 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -262,20 +262,16 @@ SPITZ_DEFAULT_ROOTFS="core-image-sato" setup_tmpdir() { if [ -z "$TMPDIR" ]; then - if [ "x$BUILDDIR" = "x" -o ! -d "$BUILDDIR/tmp" ]; then - # BUILDDIR unset, try and get TMPDIR from bitbake - type -P bitbake &>/dev/null || { - echo "In order for this script to dynamically infer paths"; - echo "to kernels or filesystem images, you either need"; - echo "bitbake in your PATH or to source oe-init-build-env"; - echo "before running this script" >&2; - exit 1; } - - # We have bitbake in PATH, get TMPDIR from bitbake - TMPDIR=`bitbake -e | grep TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2` - else - TMPDIR=$BUILDDIR/tmp - fi + # BUILDDIR unset, try and get TMPDIR from bitbake + type -P bitbake &>/dev/null || { + echo "In order for this script to dynamically infer paths"; + echo "to kernels or filesystem images, you either need"; + echo "bitbake in your PATH or to source oe-init-build-env"; + echo "before running this script" >&2; + exit 1; } + + # We have bitbake in PATH, get TMPDIR from bitbake + TMPDIR=`bitbake -e | grep TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2` fi } |