summaryrefslogtreecommitdiffstats
path: root/oe-init-build-env-memres
diff options
context:
space:
mode:
Diffstat (limited to 'oe-init-build-env-memres')
-rwxr-xr-xoe-init-build-env-memres27
1 files changed, 16 insertions, 11 deletions
diff --git a/oe-init-build-env-memres b/oe-init-build-env-memres
index 687d5e1225..00079989dc 100755
--- a/oe-init-build-env-memres
+++ b/oe-init-build-env-memres
@@ -26,8 +26,8 @@
26# to sourcing this script. 26# to sourcing this script.
27# 27#
28if [ -z "$1" ]; then 28if [ -z "$1" ]; then
29 echo "No port specified, using 12345" 29 echo "No port specified, using dynamically selected port"
30 port=12345 30 port=-1
31else 31else
32 port=$1 32 port=$1
33 shift 33 shift
@@ -60,15 +60,20 @@ if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null ; then
60 res=$? 60 res=$?
61fi 61fi
62 62
63if [ $res != 0 ] ; then 63if [ $port = -1 ] ; then
64 bitbake --server-only -t xmlrpc -B localhost:$port 64 export BBSERVER=localhost:-1
65fi 65 echo "Bitbake server started on demand as needed, use bitbake -m to shut it down"
66else
67 if [ $res != 0 ] ; then
68 bitbake --server-only -t xmlrpc -B localhost:$port
69 fi
66 70
67export BBSERVER=`cat bitbake.lock` 71 export BBSERVER=`cat bitbake.lock`
68 72
69if [ $res = 0 ] ; then 73 if [ $res = 0 ] ; then
70 echo "Using existing bitbake server at: $BBSERVER, use bitbake -m to shut it down" 74 echo "Using existing bitbake server at: $BBSERVER, use bitbake -m to shut it down"
71else 75 else
72 echo "Bitbake server started at: $BBSERVER, use bitbake -m to shut it down" 76 echo "Bitbake server started at: $BBSERVER, use bitbake -m to shut it down"
77 fi
78 unset res
73fi 79fi
74unset res