aboutsummaryrefslogtreecommitdiffstats
path: root/util/log.sh
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-09-08 07:47:19 -0400
committerbaigk <baiguoku@huawei.com>2015-09-08 08:24:09 -0400
commitcf87d3067a63cb8be315a3addfd9c27d86be3b5a (patch)
tree861d46aebc75c73cc13a19fecfb5c48aa88a56a1 /util/log.sh
parent633175ed2c5d0ab339027ba0a542bcdd4d3769c0 (diff)
Build improvement for speedup and using public repo
JIRA: COMPASS-19 Change-Id: Iba101807e1bd2f843f1253791b7e87e1acb7934b Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'util/log.sh')
-rwxr-xr-xutil/log.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/util/log.sh b/util/log.sh
new file mode 100755
index 00000000..f54fdca5
--- /dev/null
+++ b/util/log.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+reset=`tput sgr0`
+red=`tput setaf 1`
+green=`tput setaf 2`
+yellow=`tput setaf 3`
+
+function log_info() {
+ echo -e "${green}$*${reset}"
+}
+
+function log_warn() {
+ echo -e "${yellow}$*${reset}"
+}
+
+function log_error() {
+ echo -e "${red}$*${reset}"
+}
+
+function log_progress() {
+ echo -en "${yellow}$*\r${reset}"
+}
+