[PATCH 3/3] scripts: kconfig: merge_config.sh: use POSIX test operator

Daniel Gomez posted 3 patches 4 weeks, 1 day ago
[PATCH 3/3] scripts: kconfig: merge_config.sh: use POSIX test operator
Posted by Daniel Gomez 4 weeks, 1 day ago
From: Daniel Gomez <da.gomez@samsung.com>

The script uses #!/bin/sh but == for string comparison, which is a bash
extension. This causes an error on systems where /bin/sh is not bash:

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

Use = instead, as used in the rest of the script.

Fixes: dfc97e1c5da5b ("scripts: kconfig: merge_config.sh: use awk in checks too")

Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
 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 95f090b88e8d..f08e0863b712 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -377,7 +377,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.53.0