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 |
Krzysztof Szukiełojć | 3f41d08 | 2017-05-07 14:43:06 +0200 | [diff] [blame] | 11 | go get gerrit.mcp.mirantis.net/debian/gophercloud.git |
| 12 | cd $GOPATH/src/gerrit.mcp.mirantis.net/debian/gophercloud.git |
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) |
Krzysztof Szukiełojć | 3f41d08 | 2017-05-07 14:43:06 +0200 | [diff] [blame] | 20 | export GOPHERCLOUD=$GOPATH/src/gerrit.mcp.mirantis.net/debian/gophercloud.git |
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 |