kconfig: add -e and -u options to *conf-cfg.sh scripts
authorMasahiro Yamada <masahiroy@kernel.org>
Tue, 11 Jun 2024 16:08:05 +0000 (01:08 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 15 Jul 2024 16:08:36 +0000 (01:08 +0900)
Set -e to make these scripts fail on the first error.

Set -u because these scripts are invoked by Makefile, and do not work
properly without necessary variables defined.

Both options are described in POSIX. [1]

[1]: https://pubs.opengroup.org/onlinepubs/009604499/utilities/set.html

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
scripts/kconfig/gconf-cfg.sh
scripts/kconfig/mconf-cfg.sh
scripts/kconfig/nconf-cfg.sh
scripts/kconfig/qconf-cfg.sh

index 040d8f3..fc954c0 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0
 
+set -eu
+
 cflags=$1
 libs=$2
 
index 1e61f50..1bc304d 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0
 
+set -eu
+
 cflags=$1
 libs=$2
 
index f871a21..a20290b 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0
 
+set -eu
+
 cflags=$1
 libs=$2
 
index 0e113b0..bb2df66 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0
 
+set -eu
+
 cflags=$1
 libs=$2
 bin=$3