]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scripts: kconfig: merge_config.sh: fix unexpected operator warning
authorWeizhao Ouyang <o451686892@gmail.com>
Mon, 9 Mar 2026 12:15:05 +0000 (20:15 +0800)
committerNathan Chancellor <nathan@kernel.org>
Mon, 9 Mar 2026 20:43:10 +0000 (13:43 -0700)
Fix a warning for:

$ ./scripts/kconfig/merge_config.sh .config extra.config
Using .config as base
Merging extra.config
./scripts/kconfig/merge_config.sh: 384: [: false: unexpected operator

The shellcheck report is also attached:

if [ "$STRICT" == "true" ] && [ "$STRICT_MODE_VIOLATED" == "true" ]; then
               ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.
                                                        ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.

Fixes: dfc97e1c5da5 ("scripts: kconfig: merge_config.sh: use awk in checks too")
Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
Reviewed-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Link: https://patch.msgid.link/20260309121505.40454-1-o451686892@gmail.com
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
scripts/kconfig/merge_config.sh

index 735e1de450c6aaca9b98b47522c35d646a5d68e0..073c6bec5245e9b85ae1bc3d2663ae99092fc2ba 100755 (executable)
@@ -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