From: Stefano Stabellini Date: Tue, 12 May 2015 13:30:09 +0000 (+0000) Subject: raisin: small stlye improvement in for_each_component X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=0a15ffbec107a0999a4fee491502111b8a7fd2ff;p=people%2Fsstabellini%2Fraisin.git raisin: small stlye improvement in for_each_component Use the found variable as a boolean. Signed-off-by: Stefano Stabellini --- diff --git a/lib/common-functions.sh b/lib/common-functions.sh index f9febee..efde84c 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