From patchwork Thu May 28 14:54:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 49119 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7117D202A3 for ; Thu, 28 May 2015 14:55:25 +0000 (UTC) Received: by lbbti3 with SMTP id ti3sf11236727lbb.1 for ; Thu, 28 May 2015 07:55:24 -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=Xwce3gH5UV205hQxz0lXt78XLBxbFEOmB6IEZDxC9TM=; b=B1lK/DPet05SyyvbJTCSrC04FkodCbeyNdx8UFD8LDXncFYp2d0HtKCF1IwPbDyGyn nbhtyYahmKaG8PC/IynNQ3M8o7QWeHXo3Ang2kkreeXpe/FwjiaMFOu1P55twIIkcbhe 7k+CXm+HQJnahCAA3GxP7c2BSQid8gHYe8ioFqdsm3VEG2SOMZfb7azCopb/B8y9T6xr oXa3siBj+gqy7dJ/StArceAc5c4ripvLGtt+fHfbIHDLVP5Q6EDhDnXxjxoitxthIh7Y 1y7Mxyzy8sXHtQ+cSWb5pkJ/ghLjwdyNDUPuUkYT13weragaYDwXm8aZnbuYVfQzUlhc XWFQ== X-Gm-Message-State: ALoCoQl+OjPhYDPENnLuIlrMKO9+MJbiuo0jdUlXDgk74iW2EhIoGhcQZDNat1mgSm8wYQQJ3Huw X-Received: by 10.112.189.131 with SMTP id gi3mr3083386lbc.6.1432824924398; Thu, 28 May 2015 07:55:24 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.228 with SMTP id z4ls102098lal.90.gmail; Thu, 28 May 2015 07:55:24 -0700 (PDT) X-Received: by 10.112.171.68 with SMTP id as4mr3307602lbc.64.1432824924178; Thu, 28 May 2015 07:55:24 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id bo7si2147835lbb.108.2015.05.28.07.55.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 May 2015 07:55:24 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by labko7 with SMTP id ko7so30319030lab.2 for ; Thu, 28 May 2015 07:55:24 -0700 (PDT) X-Received: by 10.112.219.70 with SMTP id pm6mr3202218lbc.41.1432824923951; Thu, 28 May 2015 07:55:23 -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 hn6csp1221083lbb; Thu, 28 May 2015 07:55:23 -0700 (PDT) X-Received: by 10.55.40.89 with SMTP id o86mr6122296qkh.6.1432824922729; Thu, 28 May 2015 07:55:22 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 92si2629575qgg.18.2015.05.28.07.55.21; Thu, 28 May 2015 07:55:22 -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 7451661EEA; Thu, 28 May 2015 14:55:21 +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_H2, 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 1C31261C6B; Thu, 28 May 2015 14:55:20 +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 10B5861EE7; Thu, 28 May 2015 14:55:13 +0000 (UTC) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) by lists.linaro.org (Postfix) with ESMTPS id 3F2ED61C6B for ; Thu, 28 May 2015 14:55:08 +0000 (UTC) Received: by lbcmx3 with SMTP id mx3so30101415lbc.1 for ; Thu, 28 May 2015 07:55:06 -0700 (PDT) X-Received: by 10.112.170.167 with SMTP id an7mr3276784lbc.103.1432824906804; Thu, 28 May 2015 07:55:06 -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 gn6sm602790lbc.28.2015.05.28.07.55.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 May 2015 07:55:06 -0700 (PDT) From: Christophe Milard To: anders.roxell@linaro.org, mike.holmes@linaro.org Date: Thu, 28 May 2015 16:54:46 +0200 Message-Id: <1432824886-3743-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] [PATCH] 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.54 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 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apply-and-build.sh b/apply-and-build.sh index 683a0b6..bf0300f 100755 --- a/apply-and-build.sh +++ b/apply-and-build.sh @@ -170,7 +170,7 @@ apply_patch() { git checkout . || exit 1 git clean -xdf || exit 1 popd > /dev/null - continue + return 1 else #3way apply worked echo " Warning: git am --3way, applied" @@ -182,7 +182,7 @@ apply_patch() { git checkout . || exit 1 git clean -xdf || exit 1 popd > /dev/null - continue + return 1 fi else #patch successfully applied: @@ -194,6 +194,7 @@ apply_patch() { fi popd > /dev/null + return 0 } format_patch() { @@ -261,6 +262,10 @@ for patch in $(find $PATCH_DIR -type f -iregex "${FILE_EXT_REGEX}" |sort -h); do CURRENT_LOG="${ODP_LOGDIR}/$(echo $(basename ${patch}))" echo -e "\n\nUsing patch: $(basename ${patch})" apply_patch ${ODP_BUILDDIR} ${CURRENT_LOG} + #if applying the patch failed, take next one: + if [ $? -ne 0 ]; then + continue + fi format_patch ${ODP_BUILDDIR} ${CURRENT_LOG}