]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: toaster: remove addtoConfiguration function
authorEd Bartosh <ed.bartosh@linux.intel.com>
Thu, 17 Dec 2015 16:48:52 +0000 (16:48 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 18 Dec 2015 13:51:54 +0000 (13:51 +0000)
This function is useless as it's called just once
and makes code less readable.

(Bitbake rev: 96e85159905e44533882ad8290b1c9dd252ff3ea)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/bin/toaster

index 40c3c35ef19c248621648d06148cf7ea98f0d19c..97ca17760f98beca2aeddf890741c017a52af377 100755 (executable)
@@ -83,16 +83,6 @@ webserverStartAll()
     return $retval
 }
 
-# Helper functions to add a special configuration file
-
-addtoConfiguration()
-{
-    file=$1
-    shift
-    echo "#Created by toaster start script" > ${BUILDDIR}/conf/$file
-    for var in "$@"; do echo $var >> ${BUILDDIR}/conf/$file; done
-}
-
 INSTOPSYSTEM=0
 
 # define the stop command
@@ -339,7 +329,12 @@ fi
 
 case $CMD in
     start )
-        addtoConfiguration toaster.conf "INHERIT+=\"toaster buildhistory\"" $TOASTER_BRBE
+        # Create configuration file
+        conf=${BUILDDIR}/conf/toaster.conf
+        echo "# Created by toaster start script" > $conf
+        echo "INHERIT+=\"toaster buildhistory\"" >> $conf
+        [ -n "$TOASTER_BRBE" ] && echo $TOASTER_BRBE >> $conf
+
         if [ $WEBSERVER -gt 0 ] && ! webserverStartAll; then
             echo "Failed ${CMD}."
             return 4