commit | eed0c8ca3b84eef0cd53989f6e94c3098c530d37 | [log] [tgz] |
---|---|---|
author | Bruno Martins <bgcngm@gmail.com> | Mon Jun 21 14:47:40 2021 +0100 |
committer | Bruno Martins <bgcngm@gmail.com> | Mon Aug 23 11:20:39 2021 +0200 |
tree | 87d5f3fb87f6c887ab60944aaecf4cdb67986dc5 | |
parent | f12ce8b81d584b435813b6db8401a41bd91a64d0 [diff] |
extract_utils: Skip colored echo when piped Change-Id: I8a03a36f3fa022e6858cc5c1dbca8b8037efed03
diff --git a/extract_utils.sh b/extract_utils.sh index de62732..7d2785f 100644 --- a/extract_utils.sh +++ b/extract_utils.sh
@@ -1800,7 +1800,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 }