Samuel A. Falvo II | f614c93 | 2013-06-20 15:18:43 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # This script helps new contributors set up their local workstation for |
| 4 | # gophercloud development and contributions. |
| 5 | |
| 6 | # Create the environment |
| 7 | export GOPATH=$HOME/go/gophercloud |
| 8 | mkdir -p $GOPATH |
| 9 | |
| 10 | # Download gophercloud into that environment |
jrperritt | 9b7b9e6 | 2016-07-11 22:30:50 -0500 | [diff] [blame^] | 11 | go get github.com/gophercloud/gophercloud |
| 12 | cd $GOPATH/src/github.com/gophercloud/gophercloud |
Samuel A. Falvo II | f614c93 | 2013-06-20 15:18:43 -0700 | [diff] [blame] | 13 | git checkout master |
| 14 | |
| 15 | # Write out the env.sh convenience file. |
| 16 | cd $GOPATH |
| 17 | cat <<EOF >env.sh |
| 18 | #!/bin/bash |
| 19 | export GOPATH=$(pwd) |
jrperritt | 9b7b9e6 | 2016-07-11 22:30:50 -0500 | [diff] [blame^] | 20 | export GOPHERCLOUD=$GOPATH/src/github.com/gophercloud/gophercloud |
Samuel A. Falvo II | f614c93 | 2013-06-20 15:18:43 -0700 | [diff] [blame] | 21 | EOF |
| 22 | chmod a+x env.sh |
| 23 | |
| 24 | # Make changes immediately available as a convenience. |
| 25 | . ./env.sh |