own-pki/lib/set-color.sh-old
2026-04-26 20:44:39 +02:00

26 lines
527 B
Plaintext

# check if run from script
[[ "${BASH_SOURCE[0]}" == "${0}" ]] && exit 1
#-----------------------------------------------------------
# set colors
# RED Error
# ORANGE Attention or color for parameters when
# confirmation
# CYAN Ask to user or display a data
# GREEN OK
set_color(){
if [[ "$ENABLE_COLOR" == "true" ]]; then
RED='\e[0;31m'
ORANGE='\e[0;33m'
CYAN='\e[0;36m'
GREEN='\e[0;32m'
NC='\e[0m'
else
RED=''
ORANGE=''
CYAN=''
GREEN=''
NC=''
fi
}