[PATCH 1/9] scripts: kconfig: merge_config.sh: use POSIX '=' in test

"Vincent Mailhol (Arm)" <[email protected]>
Newsgroups gmane.linux.ports.riscv,gmane.linux.kbuild.devel,gmane.linux.kernel,gmane.linux.ports.alpha,gmane.linux.ports.arm.kernel,gmane.linux.ports.arm.omap,gmane.linux.ports.mips,gmane.linux.ports.ppc64.devel,gmane.linux.ports.sh.devel,gmane.linux.kernel.samsung-soc,gmane.linux.kernel.renesas-soc,gmane.linux.ports.parisc,gmane.comp.hardware.openbmc
Message-ID <[email protected]>
merge_config.sh yields this warning:

  ./scripts/kconfig/merge_config.sh: 384: [: false: unexpected operator

This happens because the script runs under /bin/sh but compares
strings using the '==' operator, which is a bash extension. The POSIX
test command only specifies '=' for string equality.

Replace '==' with the POSIX-compatible '=' so the script works when
run with /bin/sh as intended.

Fixes: dfc97e1c5da5 ("scripts: kconfig: merge_config.sh: use awk in checks too")
Signed-off-by: Vincent Mailhol (Arm) <[email protected]>
---
 scripts/kconfig/merge_config.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 735e1de450c6..073c6bec5245 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -381,7 +381,7 @@ END {
 	STRICT_MODE_VIOLATED=true
 fi
 
-if [ "$STRICT" == "true" ] && [ "$STRICT_MODE_VIOLATED" == "true" ]; then
+if [ "$STRICT" = "true" ] && [ "$STRICT_MODE_VIOLATED" = "true" ]; then
 	echo "Requested and effective config differ"
 	exit 1
 fi

-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.