Apply binary golang installation in its function.

This commit is contained in:
parazyd 2018-01-24 15:44:15 +01:00
parent 31e01784f1
commit 4cfe1596c8
No known key found for this signature in database
GPG Key ID: F0CB28FCF78637DE
1 changed files with 4 additions and 11 deletions

View File

@ -37,7 +37,7 @@ blend_postinst() {
notice "executing $blend_name postinst"
nopackage=(musl tomb golang stem netdata multichain)
nopackage=(musl tomb golang tordam stem netdata multichain)
for app in $nopackage; do
blend_install_${app} || zerr
done || zerr
@ -108,24 +108,17 @@ EOF
## {{{ blend_install_golang()
blend_install_golang() {
fn blend_install_golang
req=(strapdir golang_version golang_url)
req=(strapdir golang_url)
ckreq || return 1
notice "grabbing golang tarball"
pushd "$strapdir"/usr/local
sudo wget "${golang_url}"
popd
notice "installing golang in $strapdir"
cat <<EOF | sudo tee ${strapdir}/install-golang >/dev/null
#!/bin/sh
cd /usr/local
tar xvf $(basename ${golang_url})
wget ${golang_url} || exit 1
tar xf $(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
EOF