diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-12-25 19:49:21 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2011-12-26 20:46:35 +0100 |
commit | f8d1749dd9a63befc9fd46198c76a63a2f4b349e (patch) | |
tree | 7956acd5ce8152f2b3d8a1cb9cb45332c6a40868 | |
parent | d3de95de5060ad276fb474b679373fb19c224cc4 (diff) | |
download | mkinitcpio-f8d1749dd9a63befc9fd46198c76a63a2f4b349e.tar.gz mkinitcpio-f8d1749dd9a63befc9fd46198c76a63a2f4b349e.tar.xz |
mkinitcpio: avoid color when stdout isn't a tty
Follow suit with lsinitcpio (change 0495018d) and make output colorless
on redirecting/piping stdout.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-x | mkinitcpio | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -148,7 +148,7 @@ while getopts ':c:k:sb:g:p:m:nvH:LMhS:t:z:' arg; do done shift $((OPTIND - 1)) -if [[ -t 2 ]] && (( COLOR )); then +if [[ -t 1 ]] && (( COLOR )); then # prefer terminal safe colored and bold text when tput is supported if tput setaf 0 &>/dev/null; then NC="$(tput sgr0)" |