Created
August 21, 2014 03:38
-
-
Save cdelorme/2389a428959958b79cfc to your computer and use it in GitHub Desktop.
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 | |
hg clone -u go1.3.1 https://code.google.com/p/go /tmp/go | |
(cd /tmp/go/src && GOROOT_FINAL="/usr/lib/go" ./make.bash) | |
mv /tmp/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wheezy only comes with golang 1.0.2, and I wanted 1.3. The instructions on golangs website are limited to how to build it, not necessarily "install" it. I reproduced what the .deb package does currently, but with the newer version of the software. I left some of the extra files and folders in the mix, so it's probably a little less clean, but it's not my fault they haven't provided their own simplified install process.
I did not include the dependencies. You should probably prepare it with:
Also, you can swap the tag
-u go1.3.1
withrelease
to get the latest release version instead.