1 #/*****************************************************************************
3 # Copyright 2019 AT&T Intellectual Property *
4 # Copyright 2019 Nokia *
6 # Licensed under the Apache License, Version 2.0 (the "License"); *
7 # you may not use this file except in compliance with the License. *
8 # You may obtain a copy of the License at *
10 # http://www.apache.org/licenses/LICENSE-2.0 *
12 # Unless required by applicable law or agreed to in writing, software *
13 # distributed under the License is distributed on an "AS IS" BASIS, *
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
15 # See the License for the specific language governing permissions and *
16 # limitations under the License. *
18 #******************************************************************************/
20 #######################################
22 ######################################
34 cecho() # Color-echo. arg1 = message, arg2 = color
36 local default_msg="No Message."
37 message=${1:-$default_msg}
39 echo -e -n "$color$message$reset_color"
48 my_string="$my_string$1"
51 cecho "$my_string" $red
58 my_string="$my_string$1"
61 echo_error "$my_string"
69 my_string="$my_string$1"
72 cecho "$my_string" $yellow
79 my_string="$my_string$1"
82 cecho "$my_string" $green
89 my_string="$my_string$1"
92 cecho "$my_string" $blue