Skip to content

Commit c2bec2a

Browse files
dkrucesmcgrof
authored andcommitted
scripts/config: update f5ef2f7bf2e3 -> d5bfb6b3814b
Changes: f757f6011c92 kbuild: fix argument parsing in scripts/config Note: v5.11 -> v6.15 Signed-off-by: Daniel Gomez <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
1 parent dabd307 commit c2bec2a

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

scripts/config

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ commands:
3232
Disable option directly after other option
3333
--module-after|-M beforeopt option
3434
Turn option into module directly after other option
35+
--refresh Refresh the config using old settings
3536
3637
commands can be repeated multiple times
3738
@@ -124,16 +125,22 @@ undef_var() {
124125
txt_delete "^# $name is not set" "$FN"
125126
}
126127

127-
if [ "$1" = "--file" ]; then
128-
FN="$2"
129-
if [ "$FN" = "" ] ; then
130-
usage
128+
FN=.config
129+
CMDS=()
130+
while [[ $# -gt 0 ]]; do
131+
if [ "$1" = "--file" ]; then
132+
if [ "$2" = "" ]; then
133+
usage
134+
fi
135+
FN="$2"
136+
shift 2
137+
else
138+
CMDS+=("$1")
139+
shift
131140
fi
132-
shift 2
133-
else
134-
FN=.config
135-
fi
141+
done
136142

143+
set -- "${CMDS[@]}"
137144
if [ "$1" = "" ] ; then
138145
usage
139146
fi
@@ -217,9 +224,8 @@ while [ "$1" != "" ] ; do
217224
set_var "${CONFIG_}$B" "${CONFIG_}$B=m" "${CONFIG_}$A"
218225
;;
219226

220-
# undocumented because it ignores --file (fixme)
221227
--refresh)
222-
yes "" | make oldconfig
228+
yes "" | make oldconfig KCONFIG_CONFIG=$FN
223229
;;
224230

225231
*)

0 commit comments

Comments
 (0)