1 ##############################################################################
2 # Copyright (c) 2017 Nokia and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
11 [ ! -z "$_tools_included" ] && return || readonly _tools_included=true
13 #######################################
14 # Echo printing in yellow bold color
19 #######################################
20 function echo_info { (
21 # don't clutter the script output with the xtrace of the echo command
22 { set +x; } 2> /dev/null
24 yellow_bold='\033[1;33m'
26 echo "${@:1:($#-1)}" -e "$yellow_bold${@: -1}$color_off";
30 #######################################
31 # Echo error (to stderr)
36 #######################################
37 function echo_error { (
38 # don't clutter the script output with the xtrace of the echo command
39 { set +x; } 2> /dev/null
43 >&2 echo "${@:1:($#-1)}" -e "$red_bold${@: -1}$color_off";
47 #######################################
48 # Echo warning (to stderr)
53 #######################################
54 function echo_warning { (
55 # don't clutter the script output with the xtrace of the echo command
56 { set +x; } 2> /dev/null
58 red_italic='\033[3;91m'
60 >&2 echo "${@:1:($#-1)}" -e "$red_italic${@: -1}$color_off";