-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstackengine.env
37 lines (31 loc) · 1010 Bytes
/
stackengine.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# attempt to add go to PATH
if ! which go &>/dev/null; then
if [[ -x /usr/local/go/bin/go ]]; then
export GOROOT=/usr/local/go
export PATH="$GOROOT/bin:$PATH"
fi
fi
# ensure go, vagrant
if ! which go &>/dev/null; then
echo "ERROR: go not found - try: brew install go"
elif ! which vagrant &>/dev/null; then
echo "ERROR: vagrant not found - try installing http://www.vagrantup.com/downloads.html" >&2
else
# ensure vagrant prereqs
for plugin in vagrant-vmware-fusion vagrant-hostmanager; do
if ! vagrant plugin list | grep "^$plugin " >/dev/null; then
vagrant plugin install $plugin
fi
done
# ensure GOPATH
if [[ -z $GOPATH ]]; then
export GOPATH=$HOME/go
mkdir -p $GOPATH/{bin,pkg,src}
export PATH="$GOPATH/bin:$PATH"
fi
# ensure goimports for vim
if ! which goimports &>/dev/null; then
go get golang.org/x/tools/cmd/goimports
fi
fi
export USERDATA_ENDPOINT=http://127.0.0.1/