git-lfs/script/bootstrap
Mike McQuaid b45aeef609 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.
2015-07-03 10:21:52 +01:00

14 lines
257 B
Bash
Executable File

#!/bin/sh
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
rm -rf bin/*
go run script/*.go -cmd build "$@"