From patchwork Wed May 20 22:00:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olof Johansson X-Patchwork-Id: 6450531 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 059A89F1C1 for ; Wed, 20 May 2015 22:05:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D01C203ED for ; Wed, 20 May 2015 22:05:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 46DBE203B0 for ; Wed, 20 May 2015 22:05:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753853AbbETWCi (ORCPT ); Wed, 20 May 2015 18:02:38 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:34933 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753924AbbETWCg (ORCPT ); Wed, 20 May 2015 18:02:36 -0400 Received: by pdea3 with SMTP id a3so83652322pde.2 for ; Wed, 20 May 2015 15:02:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pTSOqfHdZvNDGR3wqOl/G5E1GQdgHoslJF1P3cb4Vvs=; b=PP1hXjaO4aougrL2vD9gEIhYo0jAm/phtbdlVyF7Fr2kzIhau/72dp7RH6RCOJfd6Q LKhhm7HuEhzwPeWb+BAQbHrGJIzK8nK3OETyXb8DucvOyQ2FRhqXvPTybuvjE2F3mI7j Ip23XBw3I4GPm6HJIO3yDOMlW1ervFUVakTNNz9JXTZbr3KY1g6cPwbq6xrk0lxPK+aN r/udv3arDL6tc+c7S/ibVn7tiVyfZrU7xsZeDwLaoJ9t0SgbnUZaWmQOtnn/DO/1CvY6 2iZLXMWHO8GI7ww3w1iL52ImJlhjQV1IuCWGM7bciPxxSmGy4GvKyCXuYWtN0Xc91VIm oCEA== X-Gm-Message-State: ALoCoQlli03yelpESd+6SZMng3V+JjCQ9v1QxUmyW3si6weaYn1oC94TkI0QxX4byKEc9Okg8ut5 X-Received: by 10.68.102.1 with SMTP id fk1mr68414711pbb.56.1432159356323; Wed, 20 May 2015 15:02:36 -0700 (PDT) Received: from brutus.lixom.net (173-13-129-225-sfba.hfc.comcastbusiness.net. [173.13.129.225]) by mx.google.com with ESMTPSA id ux6sm17193507pab.24.2015.05.20.15.02.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 May 2015 15:02:35 -0700 (PDT) From: Olof Johansson To: yann.morin.1998@free.fr Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, dvhart@linux.intel.com, john.stultz@linaro.org, jwboyer@redhat.com, Olof Johansson Subject: [PATCH 03/10] merge_config.sh: minor argument parsing refactoring Date: Wed, 20 May 2015 15:00:53 -0700 Message-Id: <1432159260-39390-4-git-send-email-olof@lixom.net> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1432159260-39390-1-git-send-email-olof@lixom.net> References: <1432159260-39390-1-git-send-email-olof@lixom.net> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Every case that continues iterating needs a shift, so move it to common location. Also, the continues are redundant. Signed-off-by: Olof Johansson --- 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