blob: 78a195dcf79d4abbf3efe4e58ec0504f59dc09f0 [file] [log] [blame]
Samuel A. Falvo IIf614c932013-06-20 15:18:43 -07001#!/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
jrperritt9b7b9e62016-07-11 22:30:50 -050011go get github.com/gophercloud/gophercloud
12cd $GOPATH/src/github.com/gophercloud/gophercloud
Samuel A. Falvo IIf614c932013-06-20 15:18:43 -070013git checkout master
14
15# Write out the env.sh convenience file.
16cd $GOPATH
17cat <<EOF >env.sh
18#!/bin/bash
19export GOPATH=$(pwd)
jrperritt9b7b9e62016-07-11 22:30:50 -050020export GOPHERCLOUD=$GOPATH/src/github.com/gophercloud/gophercloud
Samuel A. Falvo IIf614c932013-06-20 15:18:43 -070021EOF
22chmod a+x env.sh
23
24# Make changes immediately available as a convenience.
25. ./env.sh