Browse Source

chg: dev: clean color definition !minor

Removing obsolete/unused color variables

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
cache-relation
Valentin Lab 5 years ago
parent
commit
621a93706b
  1. 48
      bin/compose

48
bin/compose

@ -15,7 +15,6 @@
## From kal-shlib ## From kal-shlib
## ##
ANSI_ESC=$'\e['
hash_get() { hash_get() {
if get_path sha256sum >/dev/null; then if get_path sha256sum >/dev/null; then
@ -73,22 +72,9 @@ ansi_color() {
fi fi
fi fi
if [ "$choice" != "no" ]; then
SET_COL_CHAR="${ANSI_ESC}${COL_CHAR}G"
SET_COL_STATUS="${ANSI_ESC}${COL_STATUS}G"
SET_COL_INFO="${ANSI_ESC}${COL_INFO}G"
SET_COL_ELT="${ANSI_ESC}${COL_ELT}G"
SET_BEGINCOL="${ANSI_ESC}0G"
ANSI_ESC=$'\e['
UP="${ANSI_ESC}1A"
DOWN="${ANSI_ESC}1B"
LEFT="${ANSI_ESC}1D"
RIGHT="${ANSI_ESC}1C"
SAVE="${ANSI_ESC}7"
RESTORE="${ANSI_ESC}8"
if [ "$choice" != "no" ]; then
NORMAL="${ANSI_ESC}0m" NORMAL="${ANSI_ESC}0m"
@ -110,23 +96,8 @@ ansi_color() {
DARKCYAN="${ANSI_ESC}0;36m" DARKCYAN="${ANSI_ESC}0;36m"
DARKWHITE="${ANSI_ESC}0;37m" DARKWHITE="${ANSI_ESC}0;37m"
SUCCESS=$GREEN
WARNING=$YELLOW
FAILURE=$RED
NOOP=$BLUE
ON=$SUCCESS
OFF=$FAILURE
ERROR=$FAILURE
else else
SET_COL_CHAR=
SET_COL_STATUS=
SET_COL_INFO=
SET_COL_ELT=
SET_BEGINCOL=
NORMAL= NORMAL=
RED= RED=
GREEN= GREEN=
@ -142,24 +113,15 @@ ansi_color() {
DARKBLUE= DARKBLUE=
DARKPINK= DARKPINK=
DARKCYAN= DARKCYAN=
SUCCESS=
WARNING=
FAILURE=
NOOP=
ON=
OFF=
ERROR=
DARKWHITE=
fi fi
ansi_color="$choice" ansi_color="$choice"
export SET_COL_CHAR SET_COL_STATUS SET_COL_INFO SET_COL_ELT \
SET_BEGINCOL UP DOWN LEFT RIGHT SAVE RESTORE NORMAL \
GRAY RED GREEN YELLOW BLUE PINK CYAN WHITE DARKGRAY \
export NORMAL GRAY RED GREEN YELLOW BLUE PINK CYAN WHITE DARKGRAY \
DARKRED DARKGREEN DARKYELLOW DARKBLUE DARKPINK DARKCYAN \ DARKRED DARKGREEN DARKYELLOW DARKBLUE DARKPINK DARKCYAN \
SUCCESS WARNING FAILURE NOOP ON OFF ERROR ansi_color
DARKWHITE SUCCESS WARNING FAILURE NOOP ON OFF ERROR ansi_color
} }

Loading…
Cancel
Save