diff options
author | Liping Ke <liping.ke@intel.com> | 2011-02-22 05:36:15 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-21 17:53:51 +0000 |
commit | 7537f44a498860c08f613544e5f40fe2f24adaa8 (patch) | |
tree | a9c7bdb169c21470023c271b6730741f8f34b99a | |
parent | 6148562de22b374ea52ee4f8fcabc9e72a3c1ff5 (diff) | |
download | openembedded-core-7537f44a498860c08f613544e5f40fe2f24adaa8.tar.gz openembedded-core-7537f44a498860c08f613544e5f40fe2f24adaa8.tar.bz2 openembedded-core-7537f44a498860c08f613544e5f40fe2f24adaa8.zip |
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 <liping.ke@intel.coom>
-rw-r--r-- | meta/recipes-devtools/installer/adt-installer/scripts/util | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/util b/meta/recipes-devtools/installer/adt-installer/scripts/util index 4b88feea5a..9be7517272 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 } |