}
if [ "$(basename $0)" == "make-buildspy" ]; then
- sleep 10
while true; do
+ sleep 10
DATA=$(cat $BUILD_SPY_FILENAME 2>/dev/null || true)
> $BUILD_SPY_FILENAME
[ -n "$DATA" ] && \
- wget -q -O /dev/null --user-agent="${NAME}BuildSpy/${VERSION}" \
+ wget -q -O - --user-agent="${NAME}BuildSpy/${VERSION}" \
--post-data="action=set&uuid=${UUID}${DATA}" \
- http://build.ipfire.org/rpc.py &
+ http://build.ipfire.org/rpc.py >> $LOGFILE 2>&1 &
+ # If $BUILD_SPY_FILENAME file has content we need a new loop.
+ # If not, check if we are still running.
+ if [ -s $BUILD_SPY_FILENAME ]; then
+ continue
+ fi
[ -e $BASEDIR/.running ] || break
- sleep 10
done
rm -f $BUILD_SPY_FILENAME
fi
build_spy_send_profile
build_spy state compiling
- BASEDIR=$BASEDIR UUID=$UUID NAME=$NAME VERSION=$VERSION $BASEDIR/tools/make-buildspy &
+ BASEDIR=$BASEDIR UUID=$UUID NAME=$NAME VERSION=$VERSION \
+ LOGFILE="$BASEDIR/log_${TARGET}/_build.00-buildspy.log" \
+ $BASEDIR/tools/make-buildspy &
if [ -f $BASEDIR/log_${TARGET}/02_base/stage2-LFS ]; then
prepareenv