2017-09-19 10:10:53 +00:00
|
|
|
COLOR_RED="\033[0;31m"
|
|
|
|
COLOR_GREEN="\033[0;32m"
|
|
|
|
COLOR_CYAN="\033[0;36m"
|
2018-02-02 09:54:00 +00:00
|
|
|
COLOR_YELLOW="\033[0;33m"
|
2017-09-19 10:10:53 +00:00
|
|
|
COLOR_PLAIN="\033[0m"
|
|
|
|
|
2018-03-10 11:47:55 +00:00
|
|
|
function error() {
|
2017-09-19 10:10:53 +00:00
|
|
|
echo -e "${COLOR_RED}$@${COLOR_PLAIN}"
|
|
|
|
}
|
|
|
|
|
2018-03-10 11:47:55 +00:00
|
|
|
function fail() {
|
2018-01-13 14:47:09 +00:00
|
|
|
error "$@"
|
2017-09-19 10:55:43 +00:00
|
|
|
exit 1
|
2017-09-19 10:10:53 +00:00
|
|
|
}
|
|
|
|
|
2018-03-10 11:47:55 +00:00
|
|
|
function info() {
|
2017-09-19 10:10:53 +00:00
|
|
|
echo -e "${COLOR_CYAN}$@${COLOR_PLAIN}"
|
|
|
|
}
|
|
|
|
|
2018-03-10 11:47:55 +00:00
|
|
|
function step() {
|
|
|
|
info "[$(date +%H:%M:%S)] $@"
|
2017-09-19 10:10:53 +00:00
|
|
|
}
|
2017-09-19 10:55:43 +00:00
|
|
|
|
2018-03-10 11:47:55 +00:00
|
|
|
function success() {
|
2017-09-19 10:55:43 +00:00
|
|
|
echo -e "${COLOR_GREEN}$@${COLOR_PLAIN}"
|
|
|
|
}
|
2018-02-02 09:54:00 +00:00
|
|
|
|
2018-03-10 11:47:55 +00:00
|
|
|
function warn() {
|
2018-02-02 09:54:00 +00:00
|
|
|
echo -e "${COLOR_YELLOW}$@${COLOR_PLAIN}"
|
|
|
|
}
|