diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-11-16 08:50:36 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-11-16 08:56:48 (GMT) |
commit | c7be363ef34d1228ad3d1d1aeba4911fbde1242f (patch) | |
tree | 6bd8a513755309152a78390b880a99442306959f | |
parent | 2f69a407f93d8baff25ea15a500427fdc79e9fdf (diff) |
Move logging out of the makefile
So that it's possible to run the same scripts from the shell.
-rw-r--r-- | Makefile | 4 | ||||
-rwxr-xr-x | commands/build | 14 | ||||
-rwxr-xr-x | commands/helpers/build | 8 | ||||
-rwxr-xr-x | scripts/log-command | 5 |
4 files changed, 18 insertions, 13 deletions
@@ -1,5 +1,3 @@ -TIMESTAMP := $(shell date +%Y%m%d-%H%M%S) -LOGFILE = $(CURDIR)/logs/build-$(TIMESTAMP).log SCRIPTS = $(CURDIR)/scripts COMMANDS = $(CURDIR)/commands LOG = $(SCRIPTS)/log-command @@ -21,7 +19,7 @@ check-system: $(COMMANDS)/check-system $(ARGS) build: check-system - $(LOG) "$(COMMANDS)/build" $(LOGFILE) + $(COMMANDS)/build run: x11-utils $(SCRIPTS)/shell/start-sugar diff --git a/commands/build b/commands/build index 99f3048..b90f0fa 100755 --- a/commands/build +++ b/commands/build @@ -1,8 +1,12 @@ -#!/usr/bin/python -u +#!/bin/bash -import common +commandsdir=`dirname "$0"` +rootdir=`dirname "$commandsdir"` +helpersdir=$commandsdir/helpers -from devbot import build +timestamp=`date +%Y%m%d-%H%M%S` +logfile=$rootdir/logs/build-$timestamp.log -common.setup() -build.build() +PYTHONPATH=$commandsdir $helpersdir/build | tee -a $logfile + +exit ${PIPESTATUS[0]} diff --git a/commands/helpers/build b/commands/helpers/build new file mode 100755 index 0000000..99f3048 --- /dev/null +++ b/commands/helpers/build @@ -0,0 +1,8 @@ +#!/usr/bin/python -u + +import common + +from devbot import build + +common.setup() +build.build() diff --git a/scripts/log-command b/scripts/log-command deleted file mode 100755 index a2fc61d..0000000 --- a/scripts/log-command +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -exec $1 | tee -a $2 - -exit ${PIPESTATUS[0]} |