Added some commands to run buildspy manually.
###############################################################################
BUILD_SPY_FILENAME=$BASEDIR/.build_spy
###############################################################################
BUILD_SPY_FILENAME=$BASEDIR/.build_spy
+BUILD_SPY_PID=$BUILD_SPY_FILENAME.pid
build_spy() {
local COMMAND
build_spy() {
local COMMAND
}
if [ "$(basename $0)" == "make-buildspy" ]; then
}
if [ "$(basename $0)" == "make-buildspy" ]; then
- if ps aux | grep -q [m]ake-buildspy; then
- # Build spy is already running. Exiting silently.
+ if [ -f "$BUILD_SPY_PID" ]; then
+ echo $$ > $BUILD_SPY_PID
+
while true; do
DATA+=$(cat $BUILD_SPY_FILENAME 2>/dev/null || true)
> $BUILD_SPY_FILENAME
while true; do
DATA+=$(cat $BUILD_SPY_FILENAME 2>/dev/null || true)
> $BUILD_SPY_FILENAME
- rm -f $BUILD_SPY_FILENAME
+ rm -f $BUILD_SPY_FILENAME $BUILD_SPY_PID
+buildspy|bs)
+ # control buildspy
+ case "$2" in
+ start)
+ build_spy start
+ ;;
+ stop)
+ build_spy exit
+ ;;
+ *)
+ usage
+ ;;
+ esac
+ ;;
+
ccache)
# ccache options
case "$2" in
ccache)
# ccache options
case "$2" in