From: Paul Eggleton Date: Tue, 13 Mar 2012 12:38:04 +0000 (+0000) Subject: scripts/bitbake: ensure user is in build directory X-Git-Tag: 2015-4~11430 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=b4df1c7c79b5c801658bcf890ba3a8eab3d83189;p=openembedded-core.git scripts/bitbake: ensure user is in build directory If the user is in any directory other than $BUILDDIR when the bitbake wrapper script is run, then show an error an exit. Fixes [YOCTO #2071]. Signed-off-by: Paul Eggleton --- diff --git a/scripts/bitbake b/scripts/bitbake index dda3b261de..45c869799d 100755 --- a/scripts/bitbake +++ b/scripts/bitbake @@ -47,6 +47,11 @@ float_test() { # but earlier versions do not float_test "$TARVERSION > 1.23" && needtar="0" +if [ "`pwd`" != "$BUILDDIR" ] ; then + echo "BitBake must be run from your build directory: $BUILDDIR" + exit 1 +fi + buildpseudo="1" if [ $needpseudo = "1" ] && [ -e "$BUILDDIR/pseudodone" ]; then PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`