mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-17 02:22:09 +00:00
add foreground color
This commit is contained in:
parent
a098992d1e
commit
6ed1a2ad20
@ -1,4 +1,9 @@
|
|||||||
|
|
||||||
|
# ansi escapes for hilighting text
|
||||||
|
F_DIMTEXT=$(echo -e "\037[31m")
|
||||||
|
F_RESET=$(echo -e "\033[39m")
|
||||||
|
|
||||||
|
|
||||||
die() {
|
die() {
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo "$msg" 1>&2
|
echo "$msg" 1>&2
|
||||||
@ -21,6 +26,7 @@ dump_log() {
|
|||||||
local log_file="$1"
|
local log_file="$1"
|
||||||
local lines="$2"
|
local lines="$2"
|
||||||
local title="DUMP OF $log_file"
|
local title="DUMP OF $log_file"
|
||||||
|
echo -n "$F_DIMTEXT"
|
||||||
if [ ! -z "$lines" ]; then
|
if [ ! -z "$lines" ]; then
|
||||||
H1 "$title (last $lines lines)"
|
H1 "$title (last $lines lines)"
|
||||||
tail -$lines "$log_file"
|
tail -$lines "$log_file"
|
||||||
@ -29,6 +35,7 @@ dump_log() {
|
|||||||
cat "$log_file"
|
cat "$log_file"
|
||||||
fi
|
fi
|
||||||
H1 "END $title"
|
H1 "END $title"
|
||||||
|
echo -n "$F_RESET"
|
||||||
}
|
}
|
||||||
|
|
||||||
install_qa_prerequisites() {
|
install_qa_prerequisites() {
|
||||||
|
Loading…
Reference in New Issue
Block a user