[bitbake-devel] [PATCH 10/11] toaster: move setting of default values

Elliot Smith elliot.smith at intel.com
Thu Dec 17 16:48:55 UTC 2015


From: Ed Bartosh <ed.bartosh at linux.intel.com>

Set default values of script parameters just before
they are parsed to increase readability.

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith at intel.com>
---
 bin/toaster | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/bin/toaster b/bin/toaster
index 6dd20c1..7cecc7b 100755
--- a/bin/toaster
+++ b/bin/toaster
@@ -159,12 +159,7 @@ fi
 BBBASEDIR=`dirname $TOASTER`/..
 MANAGE=$BBBASEDIR/lib/toaster/manage.py
 OEROOT=`dirname $TOASTER`/../..
-NOTOASTERUI=0
-WEBSERVER=1
-TOASTER_BRBE=""
-if [ "$WEB_PORT" = "" ]; then
-    WEB_PORT="8000"
-fi
+
 # this is the configuraton file we are using for toaster
 # we are using the same logic that oe-setup-builddir uses
 # (based on TEMPLATECONF and .templateconf) to determine
@@ -206,7 +201,11 @@ fi
 # make sure that the toaster.sqlite file doesn't default to `pwd` like it currently does.
 export TOASTER_DIR=`pwd`
 
+NOTOASTERUI=0
+WEBSERVER=1
 NOBROWSER=0
+TOASTER_BRBE=""
+WEB_PORT="8000"
 
 for param in $*; do
     case $param in
-- 
1.9.3

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the bitbake-devel mailing list