Commit b2154a1f authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-sh_functions: add colors to fatal() and warning()

parent 99330ad6
...@@ -317,7 +317,9 @@ sudoepm() ...@@ -317,7 +317,9 @@ sudoepm()
fatal() fatal()
{ {
if [ -z "$TEXTDOMAIN" ] ; then if [ -z "$TEXTDOMAIN" ] ; then
set_color $RED
echo "Error: $* (you can discuss the problem in Telegram: https://t.me/useepm)" >&2 echo "Error: $* (you can discuss the problem in Telegram: https://t.me/useepm)" >&2
restore_color
# else # else
# echog "Error in $0: $@" >&2 # echog "Error in $0: $@" >&2
fi fi
...@@ -329,7 +331,9 @@ fatal() ...@@ -329,7 +331,9 @@ fatal()
warning() warning()
{ {
if [ -z "$TEXTDOMAIN" ] ; then if [ -z "$TEXTDOMAIN" ] ; then
set_color $YELLOW
echo "Warning: $*" >&2 echo "Warning: $*" >&2
restore_color
# else # else
# echog "Error in $0: $@" >&2 # echog "Error in $0: $@" >&2
fi fi
......
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