lkml.org 
[lkml]   [2015]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 03/10] merge_config.sh: minor argument parsing refactoring
Date
Every case that continues iterating needs a shift, so move it to common location.
Also, the continues are redundant.

Signed-off-by: Olof Johansson <olof@lixom.net>
---
scripts/kconfig/merge_config.sh | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 5a01aa6..fb0c463 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -48,13 +48,9 @@ while true; do
case $1 in
"-n")
ALLTARGET=allnoconfig
- shift
- continue
;;
"-m")
RUNMAKE=false
- shift
- continue
;;
"-h")
usage
@@ -62,8 +58,6 @@ while true; do
;;
"-r")
WARNREDUN=true
- shift
- continue
;;
"-O")
if [ -d $2 ];then
@@ -72,13 +66,14 @@ while true; do
echo "output directory $2 does not exist" 1>&2
exit 1
fi
- shift 2
- continue
+ shift
;;
*)
break
;;
esac
+
+ shift
done

if [ "$#" -lt 2 ] ; then
--
1.7.10.4


\
 
 \ /
  Last update: 2015-05-21 00:21    [W:0.053 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site