Used $TOASTER variable(path to the toaster script) instead of
current directory name to get path to the toasterconf.json

This way script should work in both modes and it doesn't depend
on the current directory.

Signed-off-by: Ed Bartosh <[email protected]>
---
 bitbake/bin/toaster | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index bc439e6..241d546 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -173,11 +173,11 @@ fi
 # 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"
+    TOASTER_CONF="$(dirname $TOASTER)/../../meta/conf/toasterconf.json"
+    export TOASTER_CONF=$(realpath $TOASTER_CONF)
 fi
 if [ ! -f $TOASTER_CONF ]; then
-    echo "$TOASTER_CONF configuration file not found, exiting..."
+    echo "$TOASTER_CONF configuration file not found. set TOASTER_CONF to 
specify a path"
     exit 1;
 fi
 # this defines the dir toaster will use for
-- 
2.1.4

-- 
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Reply via email to