[poky] [PATCH 1/1] ADT: Fix check_result script cond comparison bug
Liping Ke
liping.ke at intel.com
Mon Feb 21 13:54:38 PST 2011
From: Liping Ke <liping.ke at intel.com>
When meeting errors, the return number can't be directly compared with
"-1". The correct way is to compare it with 0. If the result is a non-zero
number, we meet error. This patch is for fixing [BUGID #742]
Signed-off-by: Liping Ke <liping.ke at intel.coom>
---
.../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 4b88fee..9be7517 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
}
--
1.7.0.4
More information about the poky
mailing list