Make appveyor happy and try to repeat less in the vagrant inline script
This commit is contained in:
parent
7f1f91d2a3
commit
24cf4a485e
|
@ -2,24 +2,29 @@
|
||||||
# vi: set ft=ruby :
|
# vi: set ft=ruby :
|
||||||
|
|
||||||
$script = <<SCRIPT
|
$script = <<SCRIPT
|
||||||
TARBALL="https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz"
|
# Fetch from https://golang.org/dl
|
||||||
|
TARBALL="https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz"
|
||||||
|
|
||||||
|
UNTARPATH="/opt"
|
||||||
|
GOROOT="${UNTARPATH}/go"
|
||||||
|
GOPATH="${UNTARPATH}/gopath"
|
||||||
|
|
||||||
# Install Go
|
# Install Go
|
||||||
sudo wget --progress=bar:force --output-document - ${TARBALL} |\
|
sudo wget --progress=bar:force --output-document - ${TARBALL} |\
|
||||||
tar xfz - -C /opt
|
tar xfz - -C ${UNTARPATH}
|
||||||
|
|
||||||
# Setup the GOPATH
|
# Setup the GOPATH
|
||||||
sudo mkdir -p /opt/gopath
|
sudo mkdir -p ${GOPATH}
|
||||||
cat <<EOF >/tmp/gopath.sh
|
cat <<EOF >/tmp/gopath.sh
|
||||||
export GOROOT="/opt/go"
|
export GOROOT="${GOROOT}"
|
||||||
export GOPATH="/opt/gopath"
|
export GOPATH="${GOPATH}"
|
||||||
export PATH="/opt/go/bin:/opt/gopath/bin:\$PATH"
|
export PATH="${GOROOT}/bin:${GOPATH}/bin:\$PATH"
|
||||||
EOF
|
EOF
|
||||||
sudo mv /tmp/gopath.sh /etc/profile.d/gopath.sh
|
sudo mv /tmp/gopath.sh /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 /opt/go
|
sudo chown -R vagrant:vagrant ${GOROOT}
|
||||||
sudo chown -R vagrant:vagrant /opt/gopath
|
sudo chown -R vagrant:vagrant ${GOPATH}
|
||||||
|
|
||||||
# Install some other stuff we need
|
# Install some other stuff we need
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
|
Loading…
Reference in New Issue