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 |
| 11 | go get github.com/rackspace/gophercloud |
| 12 | cd $GOPATH/src/github.com/rackspace/gophercloud |
| 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) |
| 20 | export GOPHERCLOUD=$GOPATH/src/github.com/rackspace/gophercloud |
| 21 | EOF |
| 22 | chmod a+x env.sh |
| 23 | |
| 24 | # Make changes immediately available as a convenience. |
| 25 | . ./env.sh |
| 26 | |