Commit be7b0ba7 authored by gsell's avatar gsell
Browse files

lib.bash: info() and debug() added

parent 0bf0df96
......@@ -44,7 +44,20 @@ log() {
local -ri fd=$1
local -r fmt="$2\n"
shift 2
printf "$fmt" "$@" >> /dev/fd/$fd
printf -- "$fmt" "$@" >> /dev/fd/$fd
}
info() {
log 1 "$1\n" "${@:2}"
}
error() {
log 2 "$1\n" "${@:2}"
}
debug() {
[[ ${EM_DEBUG} ]] || return 0
log "$@"
}
die() {
......@@ -81,6 +94,3 @@ append_path () {
fi
}
error() {
printf "$1\n" "${@:2}" 1>&2
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment