#!/usr/bin/env bash
set -e -o pipefail -u
set -x

BUILD="$(mktemp -t builder.XXXXXXXX)"

GOPATH="${PWD}/Godeps/_workspace${GOPATH:+:${GOPATH}}" go build -o "${BUILD}" -- "$(dirname "$0")/main.go"
time "${BUILD}" "$@"
