Drop the extra sudo calls
This commit is contained in:
parent
38c633871f
commit
6a889f09b4
|
@ -8,27 +8,27 @@ $script = <<SCRIPT
|
||||||
SRCROOT="/opt/go"
|
SRCROOT="/opt/go"
|
||||||
|
|
||||||
# Install Go
|
# Install Go
|
||||||
sudo apt-get update
|
apt-get update
|
||||||
sudo apt-get install -y build-essential mercurial
|
apt-get install -y build-essential mercurial
|
||||||
sudo hg clone -u release https://code.google.com/p/go ${SRCROOT}
|
hg clone -u release https://code.google.com/p/go ${SRCROOT}
|
||||||
cd ${SRCROOT}/src
|
cd ${SRCROOT}/src
|
||||||
sudo ./all.bash
|
./all.bash
|
||||||
|
|
||||||
# Setup the GOPATH
|
# Setup the GOPATH
|
||||||
sudo mkdir -p /opt/gopath
|
mkdir -p /opt/gopath
|
||||||
cat <<EOF >/tmp/gopath.sh
|
cat <<EOF >/tmp/gopath.sh
|
||||||
export GOPATH="/opt/gopath"
|
export GOPATH="/opt/gopath"
|
||||||
export PATH="/opt/go/bin:\$GOPATH/bin:\$PATH"
|
export PATH="/opt/go/bin:\$GOPATH/bin:\$PATH"
|
||||||
EOF
|
EOF
|
||||||
sudo mv /tmp/gopath.sh /etc/profile.d/gopath.sh
|
mv /tmp/gopath.sh /etc/profile.d/gopath.sh
|
||||||
sudo chmod 0755 /etc/profile.d/gopath.sh
|
chmod 0755 /etc/profile.d/gopath.sh
|
||||||
|
|
||||||
# Make sure the gopath is usable by vagrant
|
# Make sure the gopath is usable by vagrant
|
||||||
sudo chown -R vagrant:vagrant $SRCROOT
|
chown -R vagrant:vagrant $SRCROOT
|
||||||
sudo chown -R vagrant:vagrant /opt/gopath
|
chown -R vagrant:vagrant /opt/gopath
|
||||||
|
|
||||||
# Install some other stuff we need
|
# Install some other stuff we need
|
||||||
sudo apt-get install -y curl git-core zip
|
apt-get install -y curl git-core zip
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
||||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
|
|
Loading…
Reference in New Issue