blob: 6bae6e8f14f3e3167ac1f1c936948a9a942d5304 [file] [log] [blame]
Jamie Hannaford2aaf1a62014-10-16 12:55:50 +02001#!/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
7export GOPATH=$HOME/go/gophercloud
8mkdir -p $GOPATH
9
10# Download gophercloud into that environment
11go get github.com/rackspace/gophercloud
12cd $GOPATH/src/github.com/rackspace/gophercloud
13git checkout master
14
15# Write out the env.sh convenience file.
16cd $GOPATH
17cat <<EOF >env.sh
18#!/bin/bash
19export GOPATH=$(pwd)
20export GOPHERCLOUD=$GOPATH/src/github.com/rackspace/gophercloud
21EOF
22chmod a+x env.sh
23
24# Make changes immediately available as a convenience.
25. ./env.sh
26