]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
go.bbclass: don't use test to check output from ls
authorMartin Jansa <Martin.Jansa@gmail.com>
Mon, 15 May 2023 17:37:39 +0000 (19:37 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 22 May 2023 09:53:44 +0000 (10:53 +0100)
* avoids possibly confusing error message in log.do_install like:
  ls: cannot access 'etcd/3.5.7-r0/build/bin/linux_arm64/': No such file or directory

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/classes-recipe/go.bbclass

index b02a83a5610b5e0822a639ea0b5d6145e467bff3..39bfaa515685a72f2d16db7aa586843a9aba4901 100644 (file)
@@ -132,7 +132,7 @@ go_do_install() {
        tar -C ${B} -cf - --exclude-vcs --exclude '*.test' --exclude 'testdata' pkg | \
                tar -C ${D}${libdir}/go --no-same-owner -xf -
 
-       if [ -n "`ls ${B}/${GO_BUILD_BINDIR}/`" ]; then
+       if ls ${B}/${GO_BUILD_BINDIR}/* >/dev/null 2>/dev/null ; then
                install -d ${D}${bindir}
                install -m 0755 ${B}/${GO_BUILD_BINDIR}/* ${D}${bindir}/
        fi