summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Dziendzielski <tomasz.dziendzielski@gmail.com>2020-12-22 14:21:54 +0100
committerSteve Sakoman <steve@sakoman.com>2021-01-04 04:50:23 -1000
commit5bbafa99ec76a197e433ae3fb1ee44da7be398a5 (patch)
tree881c4451a7a56f40b86031eb539a533aea18e591
parentd4efeada4b8011f18a1ba9464c70e1a2ebe33d3b (diff)
downloadopenembedded-core-5bbafa99ec76a197e433ae3fb1ee44da7be398a5.tar.gz
populate_sdk_base: Fix condition syntax if SDK_RELOCATE_AFTER_INSTALL is disabled
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> (cherry picked from commit 36a2dc83fd0e1d6e2b8441e24a4cbc48a6c4fc19) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/classes/populate_sdk_base.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 3e5b1359d6..39a7cadaf8 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -256,7 +256,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