2012-07-09 13:47:11

by Ozan Çağlayan

[permalink] [raw]
Subject: [PATCH] compat: Directly call perl instead of skip-colors

Since we can now install ckmake with make, drop dependency
on scripts/skip-colors as it is a simple oneliner. Directly
call perl instead of using it.

Signed-off-by: Ozan Çağlayan <[email protected]>
---
bin/ckmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/ckmake b/bin/ckmake
index 5468b7a..2a0bb3d 100755
--- a/bin/ckmake
+++ b/bin/ckmake
@@ -41,7 +41,7 @@ done
function tee_color_split()
{
while read; do
- echo -e $REPLY | ./scripts/skip-colors >> $1
+ echo -e $REPLY | perl -pe 's|(\e)\[(\d+)(;*)(\d*)(\w)||g' >> $1
echo -e $REPLY
done
}
@@ -104,7 +104,7 @@ function run_ckmake()
# We cannot use tee_color_split() as bash read only spits
# out output when a newline comes in. We can modif IFS but
# I am still not sure how to do this properly.
- log_try_kernel $KERNEL | ./scripts/skip-colors >> $LOG
+ log_try_kernel $KERNEL | perl -pe 's|(\e)\[(\d+)(;*)(\d*)(\w)||g' >> $LOG
log_try_kernel $KERNEL

#ionice -c 3 nice -n 20 make $QUIET KLIB=$DIR KLIB_BUILD=$DIR -j6 -Wunused-but-set-variable $ARGS &>> $LOG
--
1.7.10.4



2012-07-09 22:36:46

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH] compat: Directly call perl instead of skip-colors

On Mon, Jul 9, 2012 at 6:47 AM, Ozan Çağlayan <[email protected]> wrote:
> Since we can now install ckmake with make, drop dependency
> on scripts/skip-colors as it is a simple oneliner. Directly
> call perl instead of using it.
>
> Signed-off-by: Ozan Çağlayan <[email protected]>

Applied and pushed, thanks!

Luis