scripts/runqemu: avoid pipe with sed
authorMatthieu Crapet <Matthieu.Crapet@ingenico.com>
Tue, 6 May 2014 12:17:53 +0000 (14:17 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 8 May 2014 12:00:33 +0000 (13:00 +0100)
Replace:
cat <file> | sed -e xxx
By:
sed -e xxx <file>

(From OE-Core rev: 173769374b1b37244d64767144398337001f1c6f)

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index e270274..ff64a1d 100755 (executable)
@@ -355,10 +355,10 @@ setup_path_vars() {
 
         MACHINE=$MACHINE bitbake -e > $BITBAKE_ENV_TMPFILE
         if [ -z "$OE_TMPDIR" ] ; then
-            OE_TMPDIR=`cat $BITBAKE_ENV_TMPFILE | sed -n 's/^TMPDIR=\"\(.*\)\"/\1/p'`
+            OE_TMPDIR=`sed -n 's/^TMPDIR=\"\(.*\)\"/\1/p' $BITBAKE_ENV_TMPFILE`
         fi
         if [ -z "$DEPLOY_DIR_IMAGE" ] ; then
-            DEPLOY_DIR_IMAGE=`cat $BITBAKE_ENV_TMPFILE | sed -n 's/^DEPLOY_DIR_IMAGE=\"\(.*\)\"/\1/p'`
+            DEPLOY_DIR_IMAGE=`sed -n 's/^DEPLOY_DIR_IMAGE=\"\(.*\)\"/\1/p' $BITBAKE_ENV_TMPFILE`
         fi
         if [ -z "$OE_TMPDIR" ]; then
             # Check for errors from bitbake that the user needs to know about