[oe-commits] Khem Raj : scripts/runqemu: grep for line beginning with TMPDIR
git version control
git at git.openembedded.org
Tue Aug 2 13:33:00 UTC 2011
Module: openembedded-core.git
Branch: master
Commit: 12ddf6c6a7559d97d9b8f84fcc89ed02e30df85d
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=12ddf6c6a7559d97d9b8f84fcc89ed02e30df85d
Author: Khem Raj <raj.khem at gmail.com>
Date: Mon Aug 1 18:47:13 2011 -0700
scripts/runqemu: grep for line beginning with TMPDIR
Currently the grep regexp matches any occurance of
'TMPDIR=' but if you have another variable defined
e.g. OE_BUILD_TMPDIR=xxx then that gets picked up
too.
$ bitbake -e | grep TMPDIR=\"
TMPDIR="/home/kraj/work/angstrom/build/tmp-angstrom_2010_x-eglibc"
OE_BUILD_TMPDIR="/home/kraj/work/angstrom/build/tmp-angstrom_2010_x"
So we become a bit more stringent and look for
line starting with TMPDIR
$ bitbake -e | grep ^TMPDIR=\"
TMPDIR="/home/kraj/work/angstrom/build/tmp-angstrom_2010_x-eglibc"
make sure that it greps
only TMPDIR=xxx occurance and not values of other variables
whose names happens to end with TMPDIR
Signed-off-by: Khem Raj <raj.khem at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
scripts/runqemu | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/runqemu b/scripts/runqemu
index dacaf7c..9611c64 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -271,7 +271,7 @@ setup_tmpdir() {
exit 1; }
# We have bitbake in PATH, get TMPDIR from bitbake
- TMPDIR=`bitbake -e | grep TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
+ TMPDIR=`bitbake -e | grep ^TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
if [ -z "$TMPDIR" ]; then
echo "Error: this script needs to be run from your build directory,"
echo "or you need to explicitly set TMPDIR in your environment"
More information about the Openembedded-commits
mailing list