diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-12-16 05:35:45 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2013-01-12 22:59:33 +0100 |
commit | 823e2454176d4381cd3acc30481e9d84cdc298b1 (patch) | |
tree | fd894896aade40b4b4d432d9b495a66b6e17c953 | |
parent | f28a70ca5eedccbbf60319801bff00d061a51065 (diff) | |
download | mkinitcpio-823e2454176d4381cd3acc30481e9d84cdc298b1.tar.gz mkinitcpio-823e2454176d4381cd3acc30481e9d84cdc298b1.tar.xz |
use type to determine availability of tput
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-x | lsinitcpio | 2 | ||||
-rwxr-xr-x | mkinitcpio | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -262,7 +262,7 @@ _image=$1 if [[ -t 1 ]] && (( _optcolor )); then # prefer terminal safe colored and bold text when tput is supported - if tput setaf 0 &>/dev/null; then + if type -P tput >/dev/null; then _color_none="$(tput sgr0)" _color_bold="$(tput bold)" _color_blue="$_color_bold$(tput setaf 4)" @@ -432,7 +432,7 @@ done if [[ -t 1 ]] && (( _optcolor )); then # prefer terminal safe colored and bold text when tput is supported - if tput setaf 0 &>/dev/null; then + if type -P tput >/dev/null; then _color_none="$(tput sgr0)" _color_bold="$(tput bold)" _color_blue="$_color_bold$(tput setaf 4)" |