From patchwork Fri May 29 10:58:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 49159 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EAB61218E7 for ; Fri, 29 May 2015 10:59:13 +0000 (UTC) Received: by lbcue7 with SMTP id ue7sf17924527lbc.3 for ; Fri, 29 May 2015 03:59:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list; bh=sOJMK3P70qukTwOAMyxqqYSQJDqCRY7rB1OnGbNF750=; b=SEsKBxjTIBqlmiL+q/WpAjBeIsbxRN6JDtZHdzliBVsbpCA57+Qu9+MsHQYH4cdr33 4OWS9zsygGIqdgWqlf4K+ApAj4eLsuJ4koFat1WZKQH5USPf9kUFS3HxniyJ3G4ud9zR D+aaChizG/aaMgY3KSY+jCecEKbtOn5j9PQ9tHxtylilxRrHLD9yCzz4oP0I9Ig58ZfH 5P8dXQTKpyvsGrkwweUwyVVo2zaZBbp+21pjZVCpQqWcmGmohN0P5+rLo+RvldcTiT+6 NbW+gjcHIsyK+CYWHjtdwMDBfYOHwMRJ7FDuowrZpskLVX0vqINOdUjkOwpL+gSPUyu7 4DOw== X-Gm-Message-State: ALoCoQnDM9vId/KjWsGbfguihIZA3GIw3F3gPMKMjGdg6QUCZPHam+f73A8n116ZFfZEIPoo87XV X-Received: by 10.112.55.104 with SMTP id r8mr6897450lbp.18.1432897152928; Fri, 29 May 2015 03:59:12 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.103 with SMTP id kx7ls331160lac.62.gmail; Fri, 29 May 2015 03:59:12 -0700 (PDT) X-Received: by 10.112.180.201 with SMTP id dq9mr7624184lbc.78.1432897152774; Fri, 29 May 2015 03:59:12 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id x10si4394571lax.97.2015.05.29.03.59.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 May 2015 03:59:12 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lagv1 with SMTP id v1so52786993lag.3 for ; Fri, 29 May 2015 03:59:12 -0700 (PDT) X-Received: by 10.152.29.161 with SMTP id l1mr7318411lah.76.1432897152671; Fri, 29 May 2015 03:59:12 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp218788lbb; Fri, 29 May 2015 03:59:11 -0700 (PDT) X-Received: by 10.55.18.104 with SMTP id c101mr14432189qkh.25.1432897150832; Fri, 29 May 2015 03:59:10 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id v69si5214021qge.71.2015.05.29.03.59.10; Fri, 29 May 2015 03:59:10 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id F1D3A61FAA; Fri, 29 May 2015 10:59:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 59E3561FA1; Fri, 29 May 2015 10:59:08 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 1D41461FA8; Fri, 29 May 2015 10:59:06 +0000 (UTC) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by lists.linaro.org (Postfix) with ESMTPS id C978D61FA1 for ; Fri, 29 May 2015 10:58:56 +0000 (UTC) Received: by lbbuc2 with SMTP id uc2so46031836lbb.2 for ; Fri, 29 May 2015 03:58:55 -0700 (PDT) X-Received: by 10.112.166.37 with SMTP id zd5mr7234915lbb.75.1432897135768; Fri, 29 May 2015 03:58:55 -0700 (PDT) Received: from erachmi-VirtualBox.ki.sw.ericsson.se (c-83-233-90-46.cust.bredband2.com. [83.233.90.46]) by mx.google.com with ESMTPSA id ja1sm1313603lbc.38.2015.05.29.03.58.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 May 2015 03:58:54 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org Date: Fri, 29 May 2015 12:58:47 +0200 Message-Id: <1432897127-12308-1-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv2] apply-and-build.sh: cosmetic fix X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: christophe.milard@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 function apply_patch() now returns a status rather than directely breaking the loop of its caller. (for loop in main, continue statment in apply_patch()) Signed-off-by: Christophe Milard --- apply-and-build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apply-and-build.sh b/apply-and-build.sh index d4cc0d9..d81eff5 100755 --- a/apply-and-build.sh +++ b/apply-and-build.sh @@ -160,7 +160,7 @@ apply_patch() { git checkout . || exit 1 git clean -xdf || exit 1 popd > /dev/null - continue + return 1 else echo " Warning: git am --3way, applied" fi @@ -173,6 +173,7 @@ apply_patch() { fi popd > /dev/null + return 0 } format_patch() { @@ -238,8 +239,12 @@ FILE_EXT_REGEX=".*\.\("$(echo ${FILE_EXT}|sed -e 's/[ ,]/\\|/g')"\)$" for patch in $(find $PATCH_DIR -type f -iregex "${FILE_EXT_REGEX}" |sort -h); do BUILD_FAILURE=0 CURRENT_LOG="${ODP_LOGDIR}/$(echo $(basename ${patch}))" + echo -e "\n\nUsing patch: $(basename ${patch})" apply_patch ${ODP_BUILDDIR} ${CURRENT_LOG} + if [ $? -ne 0 ]; then + continue #go directely to next pacth if patch application failed + fi format_patch ${ODP_BUILDDIR} ${CURRENT_LOG}