diff options
author | Narinder Gupta <narinder.gupta@canonical.com> | 2017-08-08 16:11:02 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-08-08 16:11:02 +0000 |
commit | 81f7f37c15359e89eb416d3035803358eb7bfdbe (patch) | |
tree | bf6a7242c8214c7f438216cbf484caef852fb298 /ci/tools.sh | |
parent | 557a376940c3c0ce3ed47850e3604a3301340bdc (diff) | |
parent | fdd4289969e50ddb424b49ac172e446f89ab0e2e (diff) |
Merge "Improve and highlight logging to console"
Diffstat (limited to 'ci/tools.sh')
-rw-r--r-- | ci/tools.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ci/tools.sh b/ci/tools.sh new file mode 100644 index 00000000..4eed361b --- /dev/null +++ b/ci/tools.sh @@ -0,0 +1,26 @@ +############################################################################## +# Copyright (c) 2017 Nokia and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + + +####################################### +# Echo printing in yellow bold color +# Arguments: +# Same as for echo +# Returns: +# None +####################################### +function echo_info { ( + # don't clutter the script output with the xtrace of the echo command + { set +x; } 2> /dev/null + + yellow_bold='\033[1;33m' + color_off='\033[0m' + echo "${@:1:($#-1)}" -e "$yellow_bold${@: -1}$color_off"; + ) +} |