utils/config: fix shellcheck errors

SC2086 is now reported for missing Double quote around
$FN since shellcheck 0.9.0:

In utils/config line 175:
                if grep -q "# ${BR2_PREFIX}$ARG is not set" $FN ; then
                                                            ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.

In utils/config line 178:
                        if V="$(grep "^${BR2_PREFIX}$ARG=" $FN)"; then
                                                           ^-^ SC2086 (info): Double quote to prevent globbing and word splitting.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Romain Naour
2025-02-08 15:23:25 +01:00
committed by Peter Korsgaard
parent 0100c6e402
commit ef80b710f2

View File

@@ -172,10 +172,10 @@ while [ "$1" != "" ] ; do
;;
--state|-s)
if grep -q "# ${BR2_PREFIX}$ARG is not set" $FN ; then
if grep -q "# ${BR2_PREFIX}$ARG is not set" "$FN" ; then
echo n
else
if V="$(grep "^${BR2_PREFIX}$ARG=" $FN)"; then
if V="$(grep "^${BR2_PREFIX}$ARG=" "$FN")"; then
V="${V/#${BR2_PREFIX}$ARG=/}"
V="${V/#\"/}"
V="${V/%\"/}"