From 823e2454176d4381cd3acc30481e9d84cdc298b1 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 15 Dec 2012 23:35:45 -0500 Subject: use type to determine availability of tput Signed-off-by: Dave Reisner --- lsinitcpio | 2 +- mkinitcpio | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lsinitcpio b/lsinitcpio index 31b4dfe..5984cf8 100755 --- a/lsinitcpio +++ b/lsinitcpio @@ -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)" diff --git a/mkinitcpio b/mkinitcpio index 752107b..30e9236 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -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)" -- cgit v1.2.3-24-g4f1b