e407f49633
Change-Id: I203365b71b6a7534a147a950711b87b4c3bec4a9 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
32 lines
584 B
Bash
32 lines
584 B
Bash
#!/bin/bash
|
|
|
|
function enable_tox {
|
|
if [ ! -d .tox/venv ]; then
|
|
tox -e venv --notest
|
|
fi
|
|
source .tox/venv/bin/activate
|
|
}
|
|
|
|
function normalize_team {
|
|
echo "$@" | sed -e 's/ /-/g'
|
|
}
|
|
|
|
function get_team_dir {
|
|
local workdir="$1"
|
|
local team="$2"
|
|
|
|
echo "$workdir/$team" | sed -e 's/ /-/g'
|
|
}
|
|
|
|
function log_output {
|
|
local workdir="$1"
|
|
local slug="$2"
|
|
|
|
LOGFILE="$workdir/${slug}.$(date --iso-8601=seconds).log"
|
|
echo "Logging to $LOGFILE"
|
|
# Set fd 1 and 2 to write the log file
|
|
exec 1> >( tee "${LOGFILE}" ) 2>&1
|
|
date
|
|
echo $0 $@
|
|
}
|