Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] bitbake wrapper: Make sure grep runs without colorized output
@ 2011-09-21 10:31 Koen Kooi
  2011-09-21 10:34 ` Phil Blundell
  0 siblings, 1 reply; 2+ messages in thread
From: Koen Kooi @ 2011-09-21 10:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Tasslehoff Kjappfot, Koen Kooi

From: Tasslehoff Kjappfot <tasskjapp@gmail.com>

My .bashrc contained "export GREP_OPTIONS='--color=always'", and that caused the path in my pseudodone file to  be prefixed by "^[[m^[[K". Override by calling grep with --color=never.

Signed-off-by: Tasslehoff Kjappfot <tasskjapp@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 scripts/bitbake |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/bitbake b/scripts/bitbake
index 587428c..9330d71 100755
--- a/scripts/bitbake
+++ b/scripts/bitbake
@@ -65,7 +65,7 @@ if [ $buildpseudo = "1" ]; then
     if [ "$ret" != "0" ]; then
         exit 1
     fi
-    PSEUDOBINDIR=`bitbake -e | grep STAGING_BINDIR_NATIVE=\" | cut -d '=' -f2 | cut -d '"' -f2`
+    PSEUDOBINDIR=`bitbake -e | grep --color=never STAGING_BINDIR_NATIVE=\" | cut -d '=' -f2 | cut -d '"' -f2`
     ret=$?
     if [ "$ret" != "0" ]; then
         exit 1
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] bitbake wrapper: Make sure grep runs without colorized output
  2011-09-21 10:31 [PATCH] bitbake wrapper: Make sure grep runs without colorized output Koen Kooi
@ 2011-09-21 10:34 ` Phil Blundell
  0 siblings, 0 replies; 2+ messages in thread
From: Phil Blundell @ 2011-09-21 10:34 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Koen Kooi

On Wed, 2011-09-21 at 12:31 +0200, Koen Kooi wrote:
> -    PSEUDOBINDIR=`bitbake -e | grep STAGING_BINDIR_NATIVE=\" | cut -d '=' -f2 | cut -d '"' -f2`
> +    PSEUDOBINDIR=`bitbake -e | grep --color=never STAGING_BINDIR_NATIVE=\" | cut -d '=' -f2 | cut -d '"' -f2`
>      ret=$?

That's a GNU extension and won't work on all greps.  How about just
unsetting GREP_OPTIONS, or alternatively replacing that whole pipeline
with awk?

p.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-21 10:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-21 10:31 [PATCH] bitbake wrapper: Make sure grep runs without colorized output Koen Kooi
2011-09-21 10:34 ` Phil Blundell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox