#! /bin/bash # Install required stuff yum install -y gdb tmux curl which gcc git mercurial bzr subversion # Setup Go if ! yum install -y 'golang >= 1.6' then GOURL=https://storage.googleapis.com/golang GOVERSION=1.6.3 GOARCHIVE=go${GOVERSION}.linux-amd64.tar.gz mkdir /usr/local curl -o /tmp/${GOARCHIVE} -L ${GOURL}/${GOARCHIVE} tar -C /usr/local -xzf /tmp/${GOARCHIVE} rm -f /tmp/${GOARCHIVE} fi # Setup GOPATH GOPATH=/go GOPATH_PROFILE=/etc/profile.d/gopath.sh mkdir -p /go chown vagrant: /go ## Create $GOPATH_PROFILE to ensure GOPATH is setup for all users cat >${GOPATH_PROFILE} <${PROMPT_FILE} <<'EOF' #!/bin/bash export PS1="[\u@\h($(hostname -i)) \W]\$ " EOF # Cleanup yum clean all