Merge pull request #458 from github/gopath-setup

Setup GOPATH if it isn't already set.
This commit is contained in:
risk danger olson 2015-07-07 08:30:10 -06:00
commit a87daa6df5
2 changed files with 13 additions and 1 deletions

2
.gitignore vendored

@ -16,3 +16,5 @@ obj-*
rpm/BUILD*
rpm/*RPMS
src

@ -1,5 +1,15 @@
#!/bin/sh
set -e
# Only set GOPATH on non-Windows platforms as Windows can't do the symlinking
# that we need.
if [ -z "$GOPATH" ] && [ uname -s | grep -vq "_NT-" ]; then
export GOPATH="$(pwd)"
mkdir -p src/github.com/github
[ -h src/github.com/github/git-lfs ] ||
ln -s "$GOPATH" src/github.com/github/git-lfs
fi
script/fmt
rm -rf `pwd`/bin/*
rm -rf bin/*
go run script/*.go -cmd build "$@"