|
@@ -41,12 +41,12 @@ else
|
|
|
THIS_SCRIPT="$(pwd)/oe-init-build-env"
|
|
|
fi
|
|
|
if [ -n "$BBSERVER" ]; then
|
|
|
- unset BBSERVER
|
|
|
+ unset BBSERVER
|
|
|
fi
|
|
|
|
|
|
-if [ -z "$ZSH_NAME" ] && [ "x$0" = "x$THIS_SCRIPT" ]; then
|
|
|
- echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'"
|
|
|
- exit 1
|
|
|
+if [ -z "$ZSH_NAME" ] && [ "$0" = "$THIS_SCRIPT" ]; then
|
|
|
+ echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'"
|
|
|
+ exit 1
|
|
|
fi
|
|
|
|
|
|
if [ -z "$OEROOT" ]; then
|
|
@@ -57,30 +57,30 @@ unset THIS_SCRIPT
|
|
|
|
|
|
export OEROOT
|
|
|
. $OEROOT/scripts/oe-buildenv-internal && \
|
|
|
- $OEROOT/scripts/oe-setup-builddir && \
|
|
|
- [ -n "$BUILDDIR" ] && cd $BUILDDIR
|
|
|
+ TEMPLATECONF="$TEMPLATECONF" $OEROOT/scripts/oe-setup-builddir && \
|
|
|
+ [ -n "$BUILDDIR" ] && cd "$BUILDDIR"
|
|
|
unset OEROOT
|
|
|
|
|
|
res=1
|
|
|
-if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null ; then
|
|
|
- BBSERVER=`cat bitbake.lock` bitbake --status-only
|
|
|
+if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null; then
|
|
|
+ BBSERVER=$(cat bitbake.lock) bitbake --status-only
|
|
|
res=$?
|
|
|
fi
|
|
|
|
|
|
-if [ $res != 0 ] ; then
|
|
|
+if [ $res != 0 ]; then
|
|
|
bitbake --server-only -t xmlrpc -B localhost:$port
|
|
|
fi
|
|
|
|
|
|
-if [ $port = -1 ] ; then
|
|
|
+if [ $port = -1 ]; then
|
|
|
export BBSERVER=localhost:-1
|
|
|
echo "Bitbake server started on demand as needed, use bitbake -m to shut it down"
|
|
|
else
|
|
|
- export BBSERVER=`cat bitbake.lock`
|
|
|
+ export BBSERVER=$(cat bitbake.lock)
|
|
|
|
|
|
- if [ $res = 0 ] ; then
|
|
|
- echo "Using existing bitbake server at: $BBSERVER, use bitbake -m to shut it down"
|
|
|
+ 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"
|
|
|
+ echo "Bitbake server started at: $BBSERVER, use bitbake -m to shut it down"
|
|
|
fi
|
|
|
- unset res
|
|
|
fi
|
|
|
+unset port res
|