diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-10-15 09:34:14 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-16 14:13:23 +0100 |
commit | 779539cfb9447fca3bb6c489ab0e1702455c304c (patch) | |
tree | d3fd016e86b06f4f7a0246cc4f04449c9331c4c7 | |
parent | eb8b2b9ec89868b5f7191643276d226fcf4b5add (diff) | |
download | poky-779539cfb9447fca3bb6c489ab0e1702455c304c.tar.gz |
bitbake: toaster: use path to the script to guess config path
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.
(Bitbake rev: 5368d9af4e2c121938fc2421a536fb7f20a987fd)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | bitbake/bin/toaster | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster index e976604c5c..75d3390d04 100755 --- a/bitbake/bin/toaster +++ b/bitbake/bin/toaster | |||
@@ -194,11 +194,11 @@ fi | |||
194 | # in the local layers that currently prevent using an arbitrary | 194 | # in the local layers that currently prevent using an arbitrary |
195 | # toasterconf.json | 195 | # toasterconf.json |
196 | if [ "$TOASTER_CONF" = "" ]; then | 196 | if [ "$TOASTER_CONF" = "" ]; then |
197 | BIN_DIR=$(dirname -- "$0") | 197 | TOASTER_CONF="$(dirname $TOASTER)/../../meta-yocto/conf/toasterconf.json" |
198 | export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" | 198 | export TOASTER_CONF=$(python -c "import os; print os.path.realpath('$TOASTER_CONF')") |
199 | fi | 199 | fi |
200 | if [ ! -f $TOASTER_CONF ]; then | 200 | if [ ! -f $TOASTER_CONF ]; then |
201 | echo "$TOASTER_CONF configuration file not found, exiting..." | 201 | echo "$TOASTER_CONF configuration file not found. set TOASTER_CONF to specify a path" |
202 | exit 1; | 202 | exit 1; |
203 | fi | 203 | fi |
204 | # this defines the dir toaster will use for | 204 | # this defines the dir toaster will use for |