Created
February 24, 2015 14:07
-
-
Save cdelorme/77d4e2ae02c45685391a to your computer and use it in GitHub Desktop.
debian-build-golang-1.4.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
aptitude install -ryq build-essential | |
pushd /tmp | |
git clone https://go.googlesource.com/go go/ | |
pushd go/ | |
git checkout go1.4.2 | |
pushd src/ | |
GOROOT_FINAL="/usr/lib/go" ./all.bash | |
popd | |
popd | |
mv go /usr/lib/ | |
mkdir -p /usr/share/doc/golang-doc /usr/share/go/ | |
mv /usr/lib/go/src /usr/share/go/ | |
mv /usr/lib/go/doc /usr/share/doc/golang-doc/html | |
mv /usr/lib/go/favicon.ico /usr/share/doc/golang-doc/ | |
ln -sf /usr/share/go/src /usr/lib/go/src | |
ln -sf /usr/share/doc/golang-doc/html /usr/lib/go/doc | |
ln -sf /usr/lib/go/favicon.ico /usr/share/doc/golang-doc/favicon.ico | |
ln -sf /usr/lib/go/bin/go /usr/local/bin/go | |
ln -sf /usr/lib/go/bin/gofmt /usr/local/bin/gofmt | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Build and install golang 1.4.2 on debian wheezy (current stable).
Script requires root privileges to run, installs build-essential package and all recommended additions.
Execution uses pushd/popd so it won't effect the pwd of the "executioner".
Post-install steps may need to be modified or added to, and are based off a slightly older build.