mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-04 00:17:06 +00:00
33 lines
530 B
Bash
33 lines
530 B
Bash
# ansi escapes for hilighting text
|
|
F_DANGER=$(echo -e "\033[31m")
|
|
F_WARN=$(echo -e "\033[93m")
|
|
F_RESET=$(echo -e "\033[39m")
|
|
|
|
|
|
danger() {
|
|
local echoarg
|
|
case "$1" in
|
|
-n )
|
|
echoarg="$1"
|
|
shift
|
|
;;
|
|
* )
|
|
echoarg=""
|
|
esac
|
|
echo $echoarg "${F_DANGER}$1${F_RESET}"
|
|
}
|
|
|
|
warn() {
|
|
local echoarg
|
|
case "$1" in
|
|
-n )
|
|
echoarg="$1"
|
|
shift
|
|
;;
|
|
* )
|
|
echoarg=""
|
|
esac
|
|
echo "${F_WARN}$1${F_RESET}"
|
|
}
|
|
|