[FFmpeg-cvslog] configure: colorize error messages

Ganesh Ajjanagadde git at videolan.org
Fri Sep 11 12:58:48 CEST 2015


ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Wed Sep  9 20:47:22 2015 -0400| [07d33439f3107d3e84d6408a7be2d6c794c8e256] | committer: Michael Niedermayer

configure: colorize error messages

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=07d33439f3107d3e84d6408a7be2d6c794c8e256
---

 configure |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index 056feea..8cbde23 100755
--- a/configure
+++ b/configure
@@ -421,6 +421,7 @@ if test -t 1 && which tput >/dev/null; then
     if test -n "$ncolors" && test $ncolors -ge 8; then
         bold_color=$(tput bold)
         warn_color=$(tput setaf 3)
+        error_color=$(tput setaf 1)
         reset_color=$(tput sgr0)
     fi
 fi
@@ -435,18 +436,14 @@ log_file(){
     log END $1
 }
 
-echolog(){
-    log "$@"
-    echo "$@"
-}
-
 warn(){
     log "WARNING: $*"
     WARNINGS="${WARNINGS}WARNING: $*\n"
 }
 
 die(){
-    echolog "$@"
+    log "$@"
+    echo "$error_color$bold_color$@$reset_color"
     cat <<EOF
 
 If you think configure made a mistake, make sure you are using the latest



More information about the ffmpeg-cvslog mailing list