]> code.ossystems Code Review - openembedded-core.git/commitdiff
populate_sdk_base: Fix condition syntax if SDK_RELOCATE_AFTER_INSTALL is disabled
authorTomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Tue, 22 Dec 2020 13:21:54 +0000 (14:21 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 24 Dec 2020 08:25:10 +0000 (08:25 +0000)
If variable is set to empty string the comparison is "if [ -eq 1 ]"
which fails with "[: -eq: unary operator expected".

Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/populate_sdk_base.bbclass

index 49b183326564a0669f6eddd46b6455872a8d6388..4db0511dba03a83e3a046ca9ce35dc963afed7c9 100644 (file)
@@ -263,7 +263,7 @@ fakeroot create_shar() {
 
        rm -f ${T}/pre_install_command ${T}/post_install_command
 
-       if [ ${SDK_RELOCATE_AFTER_INSTALL} -eq 1 ] ; then
+       if [ "${SDK_RELOCATE_AFTER_INSTALL}" = "1" ] ; then
                cp ${TOOLCHAIN_SHAR_REL_TMPL} ${T}/post_install_command
        fi
        cat << "EOF" >> ${T}/pre_install_command