lib/display.sh: some cosmetics improvement
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
# Defines color codes (standard 16 colors display)
|
||||
# Some display functions and defines color codes
|
||||
# (standard 16 colors display)
|
||||
|
||||
DEFAULTFG="\e[0;39m"
|
||||
DEFAULTBG="\e[0;49m"
|
||||
@@ -70,20 +71,20 @@ On_IWhite='\e[0;107m'
|
||||
# Affiche le status avec en-tête coloré et timestamp
|
||||
# (valeur de $1 : I=info, W=warning, E=error, pas d'entête si différent)
|
||||
prnt() {
|
||||
case $1 in
|
||||
case $1 in
|
||||
"I")
|
||||
HEADS="[ ${IGreen}info${DEFAULTFG} ]"
|
||||
shift
|
||||
;;
|
||||
HEADS="[ ${IGreen}info${DEFAULTFG} ]"
|
||||
shift
|
||||
;;
|
||||
"W")
|
||||
HEADS="[ ${IYellow}Attention${DEFAULTFG} ]"
|
||||
shift
|
||||
;;
|
||||
HEADS="[ ${IYellow}Attention${DEFAULTFG} ]"
|
||||
shift
|
||||
;;
|
||||
"E")
|
||||
HEADS="[ ${IRed}ERREUR${DEFAULTFG} ]"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
echo -e "${IWhite}$(date $DATEFORMAT)${DEFAULTFG} ${HEADS} $@"
|
||||
HEADS="[ ${IRed}ERREUR${DEFAULTFG} ]"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
echo -e "${IWhite}$(date $DATEFORMAT)${DEFAULTFG} ${HEADS} $@"
|
||||
}
|
||||
export -f prnt
|
||||
|
||||
Reference in New Issue
Block a user