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"
|
DEFAULTFG="\e[0;39m"
|
||||||
DEFAULTBG="\e[0;49m"
|
DEFAULTBG="\e[0;49m"
|
||||||
@@ -70,20 +71,20 @@ On_IWhite='\e[0;107m'
|
|||||||
# Affiche le status avec en-tête coloré et timestamp
|
# 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)
|
# (valeur de $1 : I=info, W=warning, E=error, pas d'entête si différent)
|
||||||
prnt() {
|
prnt() {
|
||||||
case $1 in
|
case $1 in
|
||||||
"I")
|
"I")
|
||||||
HEADS="[ ${IGreen}info${DEFAULTFG} ]"
|
HEADS="[ ${IGreen}info${DEFAULTFG} ]"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
"W")
|
"W")
|
||||||
HEADS="[ ${IYellow}Attention${DEFAULTFG} ]"
|
HEADS="[ ${IYellow}Attention${DEFAULTFG} ]"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
"E")
|
"E")
|
||||||
HEADS="[ ${IRed}ERREUR${DEFAULTFG} ]"
|
HEADS="[ ${IRed}ERREUR${DEFAULTFG} ]"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
echo -e "${IWhite}$(date $DATEFORMAT)${DEFAULTFG} ${HEADS} $@"
|
echo -e "${IWhite}$(date $DATEFORMAT)${DEFAULTFG} ${HEADS} $@"
|
||||||
}
|
}
|
||||||
export -f prnt
|
export -f prnt
|
||||||
|
|||||||
Reference in New Issue
Block a user