mirror of
https://github.com/status-im/status-go.git
synced 2025-02-03 10:25:35 +00:00
ebd77aabe2
* static: updates Whisper test (to work with Geth 1.6.1) * jail: VM persistence implemented * jail: sendMessage/showSuggestions minor fixes (to be squashed) * node: CHT and boot nodes auto-load implemented * Replaced CHT data file from farazdagi's to tiabc's * Rewrote config_test.go using testify having reduced it twice in size * Increased SyncTime and panic timeout in tests * Fixed test - remove go default test to testify/suite (#207) * Add flag setup for RPCEnabled and add comment (#225) * jail: register method handlers before running initial js in jail (#226) * Console Jail Mod #179 (#228) * Added ./statusd-data into .gitignore * Increased log level for the test node from INFO to ERROR * Add call to loop.Run to evaluate all setTimeout/setIntervals methods. (#208) * Rebase onto geth1.6.7 (#232) * Got back sync duration from 60s to 30s, updated bindata.go
54 lines
1018 B
Bash
54 lines
1018 B
Bash
# shared shell functions
|
|
|
|
info() {
|
|
local msg="$@"
|
|
local timestamp="$(date +%H:%M:%S)"
|
|
say "===> ${timestamp} ${msg}" "green"
|
|
}
|
|
|
|
warn() {
|
|
local msg="$@"
|
|
local timestamp=$(date +%H:%M:%S)
|
|
say "===> ${timestamp} WARN: ${msg}" "yellow" >&2
|
|
}
|
|
|
|
fail() {
|
|
local msg="$@"
|
|
say "ERROR: ${msg}" "red" >&2
|
|
exit 1
|
|
}
|
|
|
|
# say prints the given message to STDOUT, using the optional color if
|
|
# STDOUT is a terminal.
|
|
#
|
|
# usage:
|
|
#
|
|
# say "foo" - prints "foo"
|
|
# say "bar" "red" - prints "bar" in red
|
|
# say "baz" "green" - prints "baz" in green
|
|
# say "qux" "red" | tee - prints "qux" with no colour
|
|
#
|
|
say() {
|
|
local msg=$1
|
|
local color=$2
|
|
|
|
if [[ -n "${color}" ]] && [[ -t 1 ]]; then
|
|
case "${color}" in
|
|
red)
|
|
echo -e "\033[1;31m${msg}\033[0m"
|
|
;;
|
|
green)
|
|
echo -e "\033[1;32m${msg}\033[0m"
|
|
;;
|
|
yellow)
|
|
echo -e "\033[1;33m${msg}\033[0m"
|
|
;;
|
|
*)
|
|
echo "${msg}"
|
|
;;
|
|
esac
|
|
else
|
|
echo "${msg}"
|
|
fi
|
|
}
|