summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-08-02 01:47:13 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-02 13:32:10 (GMT)
commit68bd81506fd258d8dfae077a719982f91c56dceb (patch)
tree18f6e2d26500ac3d12aeb7072f9098a4c3eb5b41
parent46cf540e63a848512617b20fd8492f81bfb2f704 (diff)
downloadpoky-68bd81506fd258d8dfae077a719982f91c56dceb.tar.gz
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 (From OE-Core rev: 12ddf6c6a7559d97d9b8f84fcc89ed02e30df85d) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/runqemu2
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() {
271 exit 1; } 271 exit 1; }
272 272
273 # We have bitbake in PATH, get TMPDIR from bitbake 273 # We have bitbake in PATH, get TMPDIR from bitbake
274 TMPDIR=`bitbake -e | grep TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2` 274 TMPDIR=`bitbake -e | grep ^TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
275 if [ -z "$TMPDIR" ]; then 275 if [ -z "$TMPDIR" ]; then
276 echo "Error: this script needs to be run from your build directory," 276 echo "Error: this script needs to be run from your build directory,"
277 echo "or you need to explicitly set TMPDIR in your environment" 277 echo "or you need to explicitly set TMPDIR in your environment"