From: Liping Ke Date: Mon, 21 Feb 2011 21:36:15 +0000 (+0800) Subject: ADT: Fix check_result script cond comparison bug X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~46440 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7537f44a498860c08f613544e5f40fe2f24adaa8;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git ADT: Fix check_result script cond comparison bug When meeting errors, the return number can't be directly compared with -1. Actually, it might be represented as 255. The correct way is to compared it with 0. If the result is non-zero number, we meet error. This patch is for fixing [BUGID #742] Signed-off-by: Liping Ke --- diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/util b/meta/recipes-devtools/installer/adt-installer/scripts/util index 4b88feea5ad..9be75172723 100644 --- a/meta/recipes-devtools/installer/adt-installer/scripts/util +++ b/meta/recipes-devtools/installer/adt-installer/scripts/util @@ -84,14 +84,14 @@ done check_result() { - result="$?" - if [ "$result" == "-1" ]; then + result=$? + if [ $result -eq 1 ]; then + exit -1 + elif [ $result -ne 0 ]; then echo_info "\n#############################################################################" echo_info "# Meet error(s) when installing Yocto ADT! Please check log file for details. " echo_info "#############################################################################\n" exit -1 - elif [ "$result" == "1" ]; then - exit -1 fi }