diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-06-15 23:37:49 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-06-15 23:37:49 (GMT) |
commit | 58364fe33cc9d3d1243c65732d4fadb180bdf52d (patch) | |
tree | 7de641f11187546c3d73ead80bd1631b2d986cba | |
parent | 6cc65887678cf00de4b7ddd67682a464bda9e803 (diff) |
Don't use script in buildbot
-rw-r--r-- | Makefile | 19 | ||||
-rw-r--r-- | scripts/log-command | 5 |
2 files changed, 20 insertions, 4 deletions
@@ -2,13 +2,24 @@ TIMESTAMP := $(shell date +%Y%m%d-%H%M%S) LOGFILE = $(CURDIR)/logs/build-$(TIMESTAMP).log SCRIPTS = $(CURDIR)/scripts JHBUILD = $(CURDIR)/build/bin/jhbuild -f $(SCRIPTS)/jhbuildrc +LOG = $(SCRIPTS)/log-command + +# The buildbot shell does not handle script properly. It's unnecessary +# anyway because we can't use interactive scripts there. +ifdef SUGAR_BUILDBOT +TYPESCRIPT = $(LOG) +else +TYPESCRIPT = script -ae -c +endif + +all: build submodules: git submodule init git submodule update check-system: - script -ae -c "$(SCRIPTS)/check-system" $(LOGFILE) + $(TYPESCRIPT) $(SCRIPTS)/check-system $(LOGFILE) install-jhbuild: submodules check-system cd $(SCRIPTS)/jhbuild ; \ @@ -16,15 +27,15 @@ install-jhbuild: submodules check-system make ; make install build-activities: submodules - $(JHBUILD) run $(SCRIPTS)/build-activity terminal | tee -a $(LOGFILE) + $(LOG) "$(JHBUILD) run $(SCRIPTS)/build-activity terminal" $(LOGFILE) build-glucose: install-jhbuild check-system - script -ae -c "$(JHBUILD) build" $(LOGFILE) + $(TYPESCRIPT) "$(JHBUILD) build" $(LOGFILE) build: build-glucose build-activities build-%: - script -ae -c "$(JHBUILD) buildone $*" $(LOGFILE) + $(TYPESCRIPT) "$(JHBUILD) buildone $*" $(LOGFILE) run: xinit $(SCRIPTS)/xinitrc -- :2 diff --git a/scripts/log-command b/scripts/log-command new file mode 100644 index 0000000..881513f --- /dev/null +++ b/scripts/log-command @@ -0,0 +1,5 @@ +#!/bin/sh + +exec $1 | tee $2 + +exit ${PIPESTATUS[0]} |