Patchwork [7/7] scripts/runqemu: avoid pipe with sed

login
register
mail settings
Submitter Matthieu CRAPET
Date May 6, 2014, 12:17 p.m.
Message ID <1399378673-32040-7-git-send-email-Matthieu.Crapet@ingenico.com>
Download mbox | patch
Permalink /patch/71601/
State Accepted
Commit 37dcf148ba6d5eb82e894bb52fa4d94e6d5de07e
Headers show

Comments

Matthieu CRAPET - May 6, 2014, 12:17 p.m.
Replace:
cat <file> | sed -e xxx
By:
sed -e xxx <file>

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
---
 scripts/runqemu | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/scripts/runqemu b/scripts/runqemu
index e270274..ff64a1d 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -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