Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Check for terminals ability to display colours #2216

Merged
merged 1 commit into from
Jul 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions dev_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,16 @@ function get_YN() {
done
}

# If tput is available and can handle multiple colors
if found_exe tput ; then
GREEN=$(tput setaf 2)
BLUE=$(tput setaf 4)
CYAN=$(tput setaf 6)
YELLOW=$(tput setaf 3)
RESET=$(tput sgr0)
HIGHLIGHT=$YELLOW
if [[ $(tput colors) != "-1" ]]; then
GREEN=$(tput setaf 2)
BLUE=$(tput setaf 4)
CYAN=$(tput setaf 6)
YELLOW=$(tput setaf 3)
RESET=$(tput sgr0)
HIGHLIGHT=$YELLOW
fi
fi

# Run a setup wizard the very first time that guides the user through some decisions
Expand Down