]> xenbits.xensource.com Git - people/sstabellini/raisin.git/commitdiff
raisin: small stlye improvement in for_each_component
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 12 May 2015 13:30:09 +0000 (13:30 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 12 May 2015 13:30:09 +0000 (13:30 +0000)
Use the found variable as a boolean.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
lib/common-functions.sh

index f9febee7b4f507986f60923fbb3d612d924237df..efde84c1233c7f7280c0dcd255b07b7fd1793d2f 100644 (file)
@@ -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