Last active
September 13, 2016 04:41
-
-
Save nullbio/0d59762b5c521d9fe79b7c490a1f48b8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| function install-go --argument v | |
| if test -z $v | |
| echo "Must supply a version" | |
| return 1 | |
| end | |
| if not wget https://storage.googleapis.com/golang/go{$v}.linux-amd64.tar.gz | |
| echo "Failed to download" | |
| return 1 | |
| end | |
| echo "Cleaning GOPATH:" | |
| for i in $GOPATH | |
| echo "D" $i/pkg | |
| rm -rf $i/pkg | |
| end | |
| echo "Uninstalling previous Go" | |
| sudo rm -rf /usr/local/go | |
| echo "Installing Go" $v | |
| sudo tar -C /usr/local -xzf go{$v}.linux-amd64.tar.gz | |
| echo "Updating go-code" | |
| go get -u github.com/nsf/gocode | |
| gocode close | |
| gocode drop-cache | |
| echo "Cleaning up" | |
| rm go{$v}.linux-amd64.tar.gz | |
| curl http://foaas.com/madison/fish/pat -H "Accept: text/plain" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment