diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-10-15 09:34:17 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-16 14:07:29 +0100 |
commit | 643c42069a2788e9f40fa1bc9845f32aed3d096c (patch) | |
tree | f9ba2f01c76d5e6c2f7ee9544030dfca4ccfa7ef | |
parent | 9f68f317e33d617558fce3427a94e14ef65c7d88 (diff) | |
download | bitbake-643c42069a2788e9f40fa1bc9845f32aed3d096c.tar.gz |
toaster: exit or return depending on the mode
When toaster script is sourced 'return' should be used as
using 'exit' will cause script to exit the shell and close terminal
window. If script is called 'exit' should be used. Otherwise shell
will throw and error:
return: can only `return' from a function or sourced script
Used 'return' or 'exit' depending on the toaster mode using
TOASTER_MANAGED variable.
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 | bin/toaster | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/toaster b/bin/toaster index cf93e9fd9..2c3432c24 100755 --- a/bin/toaster +++ b/bin/toaster @@ -201,7 +201,7 @@ if [ "$TOASTER_CONF" = "" ]; then fi if [ ! -f $TOASTER_CONF ]; then echo "$TOASTER_CONF configuration file not found. set TOASTER_CONF to specify a path" - exit 1; + [ "$TOASTER_MANAGED" = '1' ] && exit 1 || return 1 fi # this defines the dir toaster will use for # 1) clones of layers (in _toaster_clones ) |