#!/bin/bash 

set -e -o pipefail

base=$( cd "$( dirname "$( dirname "$0" )")" && pwd )
base_gopath=$( cd $base/../../../.. && pwd )

export GOPATH=$base_gopath
export GOBIN=$base_gopath/gobin
export PATH=$PATH:$GOBIN:$base_gopath/bin
export GO15VENDOREXPERIMENT=1

#Travis only has 2 'boosted' cores, recommends 4-6 threads max
if [ "$TRAVIS" == "true" ]; then
  export GOMAXPROCS=4
fi

exec $@
