summaryrefslogtreecommitdiffstats
path: root/scripts/oe-buildenv-internal
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-12-09 19:26:48 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-13 22:55:21 +0000
commita5438f8f74cc9117f9766cd255c3e32e793dd3dc (patch)
tree8158799dfa3f716ea5ae25bb96723c88a5368b4b /scripts/oe-buildenv-internal
parent651713adb4318167c069122d9fa3b8d0d4e978b2 (diff)
downloadpoky-a5438f8f74cc9117f9766cd255c3e32e793dd3dc.tar.gz
oe-buildenv-internal: show usage output
Show usage text if script is not sourced. Tested in bash, zsh and dash. [YOCTO #10751] (From OE-Core rev: ac7a905b18acb8bd9b2412b6682afbe1d7e18d7b) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-buildenv-internal')
-rwxr-xr-xscripts/oe-buildenv-internal12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
index 9fae3b4ec3..c8905524ff 100755
--- a/scripts/oe-buildenv-internal
+++ b/scripts/oe-buildenv-internal
@@ -18,6 +18,18 @@
18# along with this program; if not, write to the Free Software 18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 20
21if ! $(return >/dev/null 2>&1) ; then
22 echo 'oe-buildenv-internal: error: this script must be sourced'
23 echo ''
24 echo 'Usage: . $OEROOT/scripts/oe-buildenv-internal &&'
25 echo ''
26 echo 'OpenEmbedded oe-buildenv-internal - an internal script that is'
27 echo 'used in oe-init-build-env and oe-init-build-env-memres to'
28 echo 'initialize oe build environment'
29 echo ''
30 exit 2
31fi
32
21# It is assumed OEROOT is already defined when this is called 33# It is assumed OEROOT is already defined when this is called
22if [ -z "$OEROOT" ]; then 34if [ -z "$OEROOT" ]; then
23 echo >&2 "Error: OEROOT is not defined!" 35 echo >&2 "Error: OEROOT is not defined!"