Moved check for toasterconf.json after check of build environment. We'll need some variables from build environment to find toasterconf.json better way.
Signed-off-by: Ed Bartosh <[email protected]> --- bin/toaster | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/bin/toaster b/bin/toaster index badb2c1..b2e208e 100755 --- a/bin/toaster +++ b/bin/toaster @@ -162,30 +162,6 @@ TOASTER_BRBE="" if [ "$WEB_PORT" = "" ]; then WEB_PORT="8000" fi -# this is the configuraton file we are using for toaster -# note default is assuming yocto. Override this if you are -# running in a pure OE environment and use the toasterconf.json -# in meta/conf/toasterconf.json -# note: for future there are a number of relative path assumptions -# in the local layers that currently prevent using an arbitrary -# toasterconf.json -if [ "$TOASTER_CONF" = "" ]; then - BIN_DIR=$(dirname -- "$0") - export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" -fi -if [ ! -f $TOASTER_CONF ]; then - echo "$TOASTER_CONF configuration file not found, exiting..." - return 1; -fi -# this defines the dir toaster will use for -# 1) clones of layers (in _toaster_clones ) -# 2) the build dir (in build) -# 3) the sqlite db if that is being used. -# 4) pid's we need to clean up on exit/shutdown -# note: for future. in order to make this an arbitrary directory, we need to -# make sure that the toaster.sqlite file doesn't default to `pwd` like it currently does. -export TOASTER_DIR=`pwd` - NOBROWSER=0 @@ -221,13 +197,35 @@ if ! verify_prereq; then return 1 fi - # We make sure we're running in the current shell and in a good environment if [ -z "$BUILDDIR" ] || ! which bitbake >/dev/null 2>&1 ; then echo "Error: Build environment is not setup or bitbake is not in path." 1>&2 return 2 fi +# this is the configuraton file we are using for toaster +# note default is assuming yocto. Override this if you are +# running in a pure OE environment and use the toasterconf.json +# in meta/conf/toasterconf.json +# note: for future there are a number of relative path assumptions +# in the local layers that currently prevent using an arbitrary +# toasterconf.json +if [ "$TOASTER_CONF" = "" ]; then + BIN_DIR=$(dirname -- "$0") + export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" +fi +if [ ! -f $TOASTER_CONF ]; then + echo "$TOASTER_CONF configuration file not found, exiting..." + return 1; +fi +# this defines the dir toaster will use for +# 1) clones of layers (in _toaster_clones ) +# 2) the build dir (in build) +# 3) the sqlite db if that is being used. +# 4) pid's we need to clean up on exit/shutdown +# note: for future. in order to make this an arbitrary directory, we need to +# make sure that the toaster.sqlite file doesn't default to `pwd` like it currently does. +export TOASTER_DIR=`pwd` # Determine the action. If specified by arguments, fine, if not, toggle it if [ "$1" = 'start' ] || [ "$1" = 'stop' ]; then -- 2.1.4 -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
