]> code.ossystems Code Review - meta-freescale.git/commitdiff
weston-init: Rework uncomment function logic
authorVinicius Aquino <voa.aquino@gmail.com>
Mon, 12 Apr 2021 20:25:38 +0000 (17:25 -0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 13 Apr 2021 13:16:48 +0000 (10:16 -0300)
Fix error "Commented setting '#use-g2d=1' not found"
when building for some imx machines.

Signed-off-by: Vinicius Aquino <voa.aquino@gmail.com>
recipes-graphics/wayland/weston-init.bbappend

index 8e590965d22174e12bc4f841c5693a046d34ed6e..22ffb7ffe9e2e6ac99ee042c98eb210ffc53a80e 100644 (file)
@@ -40,7 +40,7 @@ INI_UNCOMMENT_ASSIGNMENTS_append_mx8mq = " \
 "
 
 uncomment() {
-    if ! (grep "^#$1" $2); then
+    if ! grep -q "^#$1" $2 && ! grep -q "^$1" $2; then
         bbfatal "Commented setting '#$1' not found in file $2"
     fi
     sed -i -e 's,^#'"$1"','"$1"',g' $2