2016-11-03 21:13:18 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
BASEDIR=$(cd "$(dirname "$0")" && pwd)
|
|
|
|
|
|
|
|
make --quiet -C "$BASEDIR" go >&2
|
2016-12-01 15:06:07 +00:00
|
|
|
GOENV="$(go env GOHOSTOS)_$(go env GOHOSTARCH)"
|
2016-11-03 21:13:18 +00:00
|
|
|
|
2016-12-01 15:06:07 +00:00
|
|
|
export GOROOT="$BASEDIR/go/$GOENV"
|
2016-11-03 21:13:18 +00:00
|
|
|
make --quiet -C "$BASEDIR" GOROOT GO="$BASEDIR/go/$GOENV/bin/go" >&2
|
|
|
|
export GOROOT="$BASEDIR/GOROOT/$GOENV"
|
|
|
|
|
|
|
|
exec $BASEDIR/go/$GOENV/bin/go "$@"
|