cfg/bin/script_framework.sh
Knut Ahlers efc8bc4f3c
Throw shfmt against bash scripts
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-03-10 12:47:55 +01:00

30 lines
474 B
Bash

COLOR_RED="\033[0;31m"
COLOR_GREEN="\033[0;32m"
COLOR_CYAN="\033[0;36m"
COLOR_YELLOW="\033[0;33m"
COLOR_PLAIN="\033[0m"
function error() {
echo -e "${COLOR_RED}$@${COLOR_PLAIN}"
}
function fail() {
error "$@"
exit 1
}
function info() {
echo -e "${COLOR_CYAN}$@${COLOR_PLAIN}"
}
function step() {
info "[$(date +%H:%M:%S)] $@"
}
function success() {
echo -e "${COLOR_GREEN}$@${COLOR_PLAIN}"
}
function warn() {
echo -e "${COLOR_YELLOW}$@${COLOR_PLAIN}"
}