9 lines
338 B
Shell
9 lines
338 B
Shell
|
|
# usage: . tools/qa/log.sh; qa <command...> – runs a command, appends command + rc to .qa/commands.log
|
|||
|
|
qa() {
|
|||
|
|
local start rc
|
|||
|
|
start=$(date -Iseconds)
|
|||
|
|
"$@"; rc=$?
|
|||
|
|
mkdir -p "$(git rev-parse --show-toplevel)/.qa"
|
|||
|
|
printf '%s\trc=%s\t%s\n' "$start" "$rc" "$*" >> "$(git rev-parse --show-toplevel)/.qa/commands.log"
|
|||
|
|
return $rc
|
|||
|
|
}
|