diff options
author | Peter Kjellerstedt <pkj@axis.com> | 2016-03-15 16:04:11 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-20 23:12:30 +0000 |
commit | ea28de6d39b4ff0db51a3f6ae1315aae7cb1260c (patch) | |
tree | 4bc097fc3edd6155aa93114ec5f9896c4b5e3d3d /oe-init-build-env-memres | |
parent | 51aa00f0f866687e43f1362d66796f61f5d52a79 (diff) | |
download | poky-ea28de6d39b4ff0db51a3f6ae1315aae7cb1260c.tar.gz |
oe-init-build-env*: Remove unnecessary differences between the scripts
While at it, also fix:
* consistent indentation (four spaces)
* unset temporary variables
* use $(...) instead of `...`
(From OE-Core rev: 1295d413f27941d0763a3d58982378738bf3ca06)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'oe-init-build-env-memres')
-rwxr-xr-x | oe-init-build-env-memres | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/oe-init-build-env-memres b/oe-init-build-env-memres index 41c09d80d0..9d393f5812 100755 --- a/oe-init-build-env-memres +++ b/oe-init-build-env-memres | |||
@@ -41,12 +41,12 @@ else | |||
41 | THIS_SCRIPT="$(pwd)/oe-init-build-env" | 41 | THIS_SCRIPT="$(pwd)/oe-init-build-env" |
42 | fi | 42 | fi |
43 | if [ -n "$BBSERVER" ]; then | 43 | if [ -n "$BBSERVER" ]; then |
44 | unset BBSERVER | 44 | unset BBSERVER |
45 | fi | 45 | fi |
46 | 46 | ||
47 | if [ -z "$ZSH_NAME" ] && [ "x$0" = "x$THIS_SCRIPT" ]; then | 47 | if [ -z "$ZSH_NAME" ] && [ "$0" = "$THIS_SCRIPT" ]; then |
48 | echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'" | 48 | echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'" |
49 | exit 1 | 49 | exit 1 |
50 | fi | 50 | fi |
51 | 51 | ||
52 | if [ -z "$OEROOT" ]; then | 52 | if [ -z "$OEROOT" ]; then |
@@ -57,30 +57,30 @@ unset THIS_SCRIPT | |||
57 | 57 | ||
58 | export OEROOT | 58 | export OEROOT |
59 | . $OEROOT/scripts/oe-buildenv-internal && \ | 59 | . $OEROOT/scripts/oe-buildenv-internal && \ |
60 | $OEROOT/scripts/oe-setup-builddir && \ | 60 | TEMPLATECONF="$TEMPLATECONF" $OEROOT/scripts/oe-setup-builddir && \ |
61 | [ -n "$BUILDDIR" ] && cd $BUILDDIR | 61 | [ -n "$BUILDDIR" ] && cd "$BUILDDIR" |
62 | unset OEROOT | 62 | unset OEROOT |
63 | 63 | ||
64 | res=1 | 64 | res=1 |
65 | if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null ; then | 65 | if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null; then |
66 | BBSERVER=`cat bitbake.lock` bitbake --status-only | 66 | BBSERVER=$(cat bitbake.lock) bitbake --status-only |
67 | res=$? | 67 | res=$? |
68 | fi | 68 | fi |
69 | 69 | ||
70 | if [ $res != 0 ] ; then | 70 | if [ $res != 0 ]; then |
71 | bitbake --server-only -t xmlrpc -B localhost:$port | 71 | bitbake --server-only -t xmlrpc -B localhost:$port |
72 | fi | 72 | fi |
73 | 73 | ||
74 | if [ $port = -1 ] ; then | 74 | if [ $port = -1 ]; then |
75 | export BBSERVER=localhost:-1 | 75 | export BBSERVER=localhost:-1 |
76 | echo "Bitbake server started on demand as needed, use bitbake -m to shut it down" | 76 | echo "Bitbake server started on demand as needed, use bitbake -m to shut it down" |
77 | else | 77 | else |
78 | export BBSERVER=`cat bitbake.lock` | 78 | export BBSERVER=$(cat bitbake.lock) |
79 | 79 | ||
80 | if [ $res = 0 ] ; then | 80 | if [ $res = 0 ]; then |
81 | echo "Using existing bitbake server at: $BBSERVER, use bitbake -m to shut it down" | 81 | echo "Using existing bitbake server at: $BBSERVER, use bitbake -m to shut it down" |
82 | else | 82 | else |
83 | echo "Bitbake server started at: $BBSERVER, use bitbake -m to shut it down" | 83 | echo "Bitbake server started at: $BBSERVER, use bitbake -m to shut it down" |
84 | fi | 84 | fi |
85 | unset res | ||
86 | fi | 85 | fi |
86 | unset port res | ||