Skip to contentSkip to conversation

compat: Directly call perl instead of skip-colors

PATCH In review Ozan Çağlayan 2 participants 2 messages Jul 9, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 bin/ckmake |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
bin/ckmake +2 -2
index 5468b7a..2a0bb3d 100755
@@ -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
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 5 lines · Ozan Çağlayan

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.

Applied and pushed, thanks!

Luis