mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Make the colorized build output readable on a light background
This fixes the readability of colorized output of compile.sh when running on a terminal with a light background. It uses the COLORFGBG environment variable similarly to how the ip(8) command does. Signed-off-by: Darsey Litzenberger <dlitz@dlitz.net>
This commit is contained in:
committed by
Igor
parent
110798c904
commit
ce33bddb58
@@ -30,7 +30,10 @@ function display_alert() {
|
||||
skip_screen=1
|
||||
fi
|
||||
level_indicator="🐛"
|
||||
inline_logs_color="\e[1;33m"
|
||||
case "${background_dark_or_light}" in
|
||||
light) inline_logs_color="\e[1;2;33m" ;;
|
||||
*) inline_logs_color="\e[1;33m" ;;
|
||||
esac
|
||||
skip_logfile=1
|
||||
;;
|
||||
|
||||
@@ -44,7 +47,10 @@ function display_alert() {
|
||||
|
||||
info)
|
||||
level_indicator="🌱"
|
||||
inline_logs_color="\e[0;32m"
|
||||
case "${background_dark_or_light}" in
|
||||
light) inline_logs_color="\e[1;2;32m" ;;
|
||||
*) inline_logs_color="\e[1;32m" ;;
|
||||
esac
|
||||
;;
|
||||
|
||||
cleanup | trap)
|
||||
@@ -52,7 +58,10 @@ function display_alert() {
|
||||
skip_screen=1
|
||||
fi
|
||||
level_indicator="🧽"
|
||||
inline_logs_color="\e[1;33m"
|
||||
case "${background_dark_or_light}" in
|
||||
light) inline_logs_color="\e[1;2;33m" ;;
|
||||
*) inline_logs_color="\e[1;33m" ;;
|
||||
esac
|
||||
skip_logfile=1
|
||||
;;
|
||||
|
||||
@@ -141,7 +150,10 @@ function display_alert() {
|
||||
|
||||
ext)
|
||||
level_indicator="✨"
|
||||
inline_logs_color="\e[1;32m"
|
||||
case "${background_dark_or_light}" in
|
||||
light) inline_logs_color="\e[1;2;32m" ;;
|
||||
*) inline_logs_color="\e[1;32m" ;;
|
||||
esac
|
||||
;;
|
||||
|
||||
change-tracking)
|
||||
@@ -152,7 +164,10 @@ function display_alert() {
|
||||
*)
|
||||
level="${level:-info}" # for file logging.
|
||||
level_indicator="🌿"
|
||||
inline_logs_color="\e[1;37m"
|
||||
case "${background_dark_or_light}" in
|
||||
dark) inline_logs_color="\e[1;37m" ;;
|
||||
*) inline_logs_color="\e[1;39m" ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
Reference in New Issue
Block a user