From: Ian Jackson Subject: Re: [PATCH 1 of 3 v2] PV-GRUB: Check for errors when applying patches to GRUB Date: Wed, 21 Mar 2012 11:27:26 +0000 Message-ID: <20329.47902.521208.252208@mariner.uk.xensource.com> References: <8124b28e88a438c4f3bd.1332269267@kaos-source-31002.sea31.amazon.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <8124b28e88a438c4f3bd.1332269267@kaos-source-31002.sea31.amazon.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Matt Wilson Cc: Samuel Thibault , "Keir (Xen.org)" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Matt Wilson writes ("[PATCH 1 of 3 v2] PV-GRUB: Check for errors when applying patches to GRUB"): > We want to ensure that patches apply cleanly without rejects. Bail if > patch returns a non-zero exit code. Thanks. > for i in grub.patches/* ; do \ > - patch -d $@ -p1 < $$i ; \ > + patch -d $@ -p1 < $$i || exit 1; \ > done This looks correct but wouldn't it be better done with a "set -e" at the top of the shell command ? Ian.