forked from dilawar/Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcolors.sh
executable file
·45 lines (42 loc) · 964 Bytes
/
colors.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Definitions of colors in bash
RESTORE='\033[0m'
RED='\033[00;31m'
GREEN='\033[00;32m'
YELLOW='\033[00;33m'
BLUE='\033[00;34m'
PURPLE='\033[00;35m'
CYAN='\033[00;36m'
LIGHTGRAY='\033[00;37m'
LRED='\033[01;31m'
LGREEN='\033[01;32m'
LYELLOW='\033[01;33m'
LBLUE='\033[01;34m'
LPURPLE='\033[01;35m'
LCYAN='\033[01;36m'
WHITE='\033[01;37m'
function colorPrint
{
case $1 in
"WARN")
echo -e "[WARN] ${LRED} $2 ${RESTORE} $3"
;;
"INFO")
echo -e "[INFO] ${LGREEN} $2 ${RESTORE} $3"
;;
"ERROR")
echo -e "[ERROR] ${RED} $2 ${RESTORE} $3"
;;
"DEBUG")
echo -e "[DEBUG] ${YELLOW} $2 ${RESTORE} $3"
;;
"STEP")
echo -e "[STEP] ${BLUE} $2 ${RESTORE} $3"
;;
"TODO")
echo -e "[TODO] ${CYAN} $2 ${RESTORE} $3"
;;
*)
echo -e "[$1] $2 $3"
;;
esac
}