bootstrap: setup GOPATH if it isn't already set.
This variable is a bit of a mystery to non-Go developers and it's unclear how you set it up properly. As a result, if it's not set let's set everything up how Go likes it. Ignore the `src` directory that we're creating now. This will also help keep the Homebrew formula simpler. Closes #388.
This commit is contained in:
parent
feebd878eb
commit
b45aeef609
2
.gitignore
vendored
2
.gitignore
vendored
@ -16,3 +16,5 @@ obj-*
|
|||||||
|
|
||||||
rpm/BUILD*
|
rpm/BUILD*
|
||||||
rpm/*RPMS
|
rpm/*RPMS
|
||||||
|
|
||||||
|
src
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ -z "$GOPATH" ]; 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
|
script/fmt
|
||||||
rm -rf bin/*
|
rm -rf bin/*
|
||||||
go run script/*.go -cmd build "$@"
|
go run script/*.go -cmd build "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user