From 2ea03ac0fce09c8d627ed6750440c93001590483 Mon Sep 17 00:00:00 2001 From: robotboy Date: Thu, 11 Feb 2010 15:30:55 -0800 Subject: [PATCH] Add warn and error functions to color warning and error output. Review URL: http://codereview.chromium.org/601050 --- common.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common.sh b/common.sh index e613df58eb..07b5cbb706 100644 --- a/common.sh +++ b/common.sh @@ -224,3 +224,14 @@ is_whitelisted() { || /bin/true) test $count -ne 0 } + +V_RED="\e[31m" +V_YELLOW="\e[33m" + +function warn { + echo -e "${V_YELLOW}Warning..: $1${V_VIDOFF}" +} + +function error { + echo -e "${V_RED}Error....: $1${V_VIDOFF}" +}