ADT: Fix script check_result error
cover ADT: Fix script check_result error
From: Liping Ke <[email protected]>
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]
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: lke/adt-fix
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=lke/adt-fix
Thanks,
Liping Ke <[email protected]>
---
Liping Ke (1):
ADT: Fix check_result script cond comparison bug
.../installer/adt-installer/scripts/util | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
PATCH 1/1 ADT: Fix check_result script cond comparison bug
From: Liping Ke <[email protected]>
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]
--- .../installer/adt-installer/scripts/util | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
meta/recipes-devtools/installer/adt-installer/scripts/util +4 -4
@@ -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 }
Signature · 1 line
1.7.0.4
Richard Purdie
AppliedQuoted 16 lines · Liping Ke
From: Liping Ke <[email protected]>
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]
Pull URL:
git://git.pokylinux.org/poky-contrib.git
Branch: lke/adt-fix
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=lke/adt-fixThanks,
Liping Ke <[email protected]>
---
Quoted 5 lines
Liping Ke (1):
ADT: Fixcheck_resultscript cond comparison bug.../installer/adt-installer/scripts/util | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
Merged to master, thanks.
Richard