Skip to contentSkip to conversation

scripts/config: Fix wrong "shift" for --keep-case

PATCH In review Hiroshi Doyu 2 participants 2 messages Dec 14, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/config: Fix wrong "shift" for --keep-case

Remove wrong "shift" for --keep-case. There is always "shift" at beginning of while-loop. No need "shift" at --keep-case just before "continue" to process next argument.

Now the following works as expected:

./scripts/config -e aAa -k -e bBb -e cCc && tail -3 .config CONFIG_AAA=y
CONFIG_bBb=y
CONFIG_cCc=y

---
 scripts/config |    1 -
 1 file changed, 1 deletion(-)
scripts/config +0 -1
index ee35539..bb4d3de 100755
@@ -101,7 +101,6 @@ while [ "$1" != "" ] ; do
 	case "$CMD" in
 	--keep-case|-k)
 		MUNGE_CASE=no
-		shift
 		continue
 		;;
 	--refresh)
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 4 lines · Hiroshi Doyu

Remove wrong "shift" for --keep-case. There is always "shift" at beginning of while-loop. No need "shift" at --keep-case just before "continue" to process next argument.

Quoted 8 lines

Now the following works as expected:

./scripts/config -e aAa -k -e bBb -e cCc && tail -3 .config CONFIG_AAA=y
CONFIG_bBb=y
CONFIG_cCc=y

Applied to kbuild.git#misc, thanks.

Michal