From: Stefano Stabellini Subject: [PATCH v2 4/4] raisin: small stlye improvement in for_each_component Date: Fri, 1 May 2015 16:48:51 +0100 Message-ID: <1430495331-8169-4-git-send-email-stefano.stabellini@eu.citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com Cc: george.dunlap@eu.citrix.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Use the found variable as a boolean. Signed-off-by: Stefano Stabellini --- lib/common-functions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/common-functions.sh b/lib/common-functions.sh index cbb658e..5ee4816 100644 --- a/lib/common-functions.sh +++ b/lib/common-functions.sh @@ -281,16 +281,16 @@ function for_each_component () { for component in `cat "$BASEDIR"/components/series` do - found=0 + found=false for enabled in $COMPONENTS do if [[ $enabled = $component ]] then - found=1 + found=true break fi done - if [[ $found -eq 0 ]] + if ! $found then verbose_echo "$component" is disabled continue -- 1.7.10.4