summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/meta-rcar-gen3
diff options
context:
space:
mode:
authorMartin Kelly <mkelly@xevo.com>2018-01-31 14:33:12 -0800
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-02-05 16:05:02 +0000
commit04dd9605fce7cc32ba807a7c07759b90b0d883f0 (patch)
treebc823753e2f5d31b9f41ff36fce95158afe7f610 /meta-agl-bsp/meta-rcar-gen3
parent47409b704c46665e34bc2e6f86d6f72d6d7ef16e (diff)
setup_mm_packages.sh: handle weird terminals
Currently, setup_mm_packages.sh fails on terminals that won't display colors (such as my Jenkins CI setup). Tweak the code to handle this case and display an error message instead of failing. Change-Id: If18e16ed385af567801a56871542b4eb86f4588d Signed-off-by: Martin Kelly <mkelly@xevo.com>
Diffstat (limited to 'meta-agl-bsp/meta-rcar-gen3')
-rw-r--r--meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh b/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh
index dddb3379c..587569f9e 100644
--- a/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh
+++ b/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh
@@ -15,10 +15,14 @@ function color {
[[ $stdout_in_terminal == 0 ]] && return
for k in $*; do
case $k in
- bold) tput bold 2>/dev/null;;
- none) tput sgr0 2>/dev/null;;
- *) tput setaf $k 2>/dev/null;;
+ bold) tput bold;;
+ none) tput sgr0;;
+ *) tput setaf $k;;
esac
+ if [[ $? != 0 ]]; then
+ echo "tput: terminal doesn't support color settings, continuing" >&2
+ true
+ fi
done
}
color_green=$(color bold 2)