aboutsummaryrefslogtreecommitdiffstats
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-memres21
1 files changed, 18 insertions, 3 deletions
diff --git a/oe-init-build-env-memres b/oe-init-build-env-memres
index 79b91b751a9..687d5e1225e 100755
--- a/oe-init-build-env-memres
+++ b/oe-init-build-env-memres
@@ -54,6 +54,21 @@ else
unset OEROOT
unset BBPATH
fi
-bitbake --server-only -t xmlrpc -B localhost:$port
-export BBSERVER=localhost:$port
-echo "Bitbake server started on port $port, use bitbake -m to shut it down"
+res=1
+if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null ; then
+ BBSERVER=`cat bitbake.lock` bitbake --status-only
+ res=$?
+fi
+
+if [ $res != 0 ] ; then
+ bitbake --server-only -t xmlrpc -B localhost:$port
+fi
+
+export BBSERVER=`cat bitbake.lock`
+
+if [ $res = 0 ] ; then
+ echo "Using existing bitbake server at: $BBSERVER, use bitbake -m to shut it down"
+else
+ echo "Bitbake server started at: $BBSERVER, use bitbake -m to shut it down"
+fi
+unset res