commit | 5064db2408ce7fbce82970e5aef23ad02e6567fb | [log] [tgz] |
---|---|---|
author | Bruno Martins <bgcngm@gmail.com> | Mon Jun 21 14:47:40 2021 +0100 |
committer | maxwen <max.weninger@gmail.com> | Sun Jul 03 16:46:25 2022 +0200 |
tree | 89b550d69c68cfbffbe24b9625b4f3fd702e3ae9 | |
parent | 74e00eb1a8ae3588a29cdc5c1a32e447b93a9ffc [diff] |
extract_utils: Skip colored echo when piped Change-Id: I8a03a36f3fa022e6858cc5c1dbca8b8037efed03
diff --git a/build/tools/extract_utils.sh b/build/tools/extract_utils.sh index 6ae2ea2..6788dfc 100755 --- a/build/tools/extract_utils.sh +++ b/build/tools/extract_utils.sh
@@ -2089,7 +2089,7 @@ white|*) color=7 ;; # white or invalid color esac fi - tput setaf $color + if [ -t 1 ] ; then tput setaf $color; fi printf '%s\n' "$*" - tput sgr0 + if [ -t 1 ] ; then tput sgr0; fi }