diff options
author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2021-01-15 02:43:53 +0100 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2021-01-16 11:19:26 +0100 |
commit | 3426ef2a74fb59654d1652a2dfac8cebc5b7697a (patch) | |
tree | e7bc59ff71b7f14a83c58c54ff22e5d3f64a8d8c /scripts | |
parent | b3ad4ea4fffbd0c433629bac952dd863ebae68a0 (diff) | |
download | ghdl-3426ef2a74fb59654d1652a2dfac8cebc5b7697a.tar.gz ghdl-3426ef2a74fb59654d1652a2dfac8cebc5b7697a.tar.bz2 ghdl-3426ef2a74fb59654d1652a2dfac8cebc5b7697a.zip |
Reworking pre-compile script for OSVVM.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/ansi_color.sh | 49 |
1 files changed, 39 insertions, 10 deletions
diff --git a/scripts/ansi_color.sh b/scripts/ansi_color.sh index bb5c348bc..d3112e335 100644 --- a/scripts/ansi_color.sh +++ b/scripts/ansi_color.sh @@ -2,17 +2,46 @@ enable_color() { ENABLECOLOR='-c ' - ANSI_RED="\033[31m" - ANSI_GREEN="\033[32m" - ANSI_YELLOW="\033[33m" - ANSI_BLUE="\033[34m" - ANSI_MAGENTA="\033[35m" - ANSI_GRAY="\033[90m" - ANSI_CYAN="\033[36;1m" - ANSI_DARKCYAN="\033[36m" - ANSI_NOCOLOR="\033[0m" + ANSI_BLACK="\e[30m" + ANSI_RED="\e[31m" + ANSI_GREEN="\e[32m" + ANSI_YELLOW="\e[33m" + ANSI_BLUE="\e[34m" + ANSI_MAGENTA="\e[35m" + ANSI_CYAN="\e[36m" + ANSI_DARK_GRAY="\e[90m" + ANSI_LIGHT_GRAY="\e[37m" + ANSI_LIGHT_RED="\e[91m" + ANSI_LIGHT_GREEN="\e[92m" + ANSI_LIGHT_YELLOW="\e[93m" + ANSI_LIGHT_BLUE="\e[94m" + ANSI_LIGHT_MAGENTA="\e[95m" + ANSI_LIGHT_CYAN="\e[96m" + ANSI_WHITE="\e[97m" + ANSI_NOCOLOR="\e[0m" + + # red texts + COLORED_ERROR="${ANSI_RED}[ERROR]" + COLORED_WARNING="${ANSI_YELLOW}[WARNING]" + COLORED_FAILED="${ANSI_RED}[FAILED]${ANSI_NOCOLOR}" + + # green texts + COLORED_DONE="${ANSI_GREEN}[DONE]${ANSI_NOCOLOR}" + COLORED_SUCCESSFUL="${ANSI_GREEN}[SUCCESSFUL]${ANSI_NOCOLOR}" } -disable_color() { unset ENABLECOLOR ANSI_RED ANSI_GREEN ANSI_YELLOW ANSI_BLUE ANSI_MAGENTA ANSI_CYAN ANSI_DARKCYAN ANSI_NOCOLOR; } +disable_color() { + unset ENABLECOLOR + unset ANSI_BLACK ANSI_RED ANSI_GREEN ANSI_YELLOW ANSI_BLUE ANSI_MAGENTA ANSI_CYAN ANSI_DARK_GRAY + unset ANSI_LIGHT_GRAY ANSI_LIGHT_RED ANSI_LIGHT_GREEN ANSI_LIGHT_YELLOW ANSI_LIGHT_BLUE ANSI_LIGHT_MAGENTA ANSI_LIGHT_CYAN + unset ANSI_NOCOLOR + + COLORED_ERROR="[ERROR]" + COLORED_WARNING="[WARNING]" + COLORED_FAILED="[FAILED]" + + COLORED_DONE="[DONE]" + COLORED_SUCCESSFUL="[SUCCESSFUL]" +} enable_color |