Skip to content

update-golang is a script to easily fetch and install new Golang releases with minimum system intrusion

License

Notifications You must be signed in to change notification settings

skyformat99/update-golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

update-golang

update-golang is a script to easily fetch and install new Golang releases

Usage

git clone https://github.com/udhos/update-golang
cd update-golang
sudo ./update-golang.sh

Example

$ sudo ./update-golang.sh
SOURCE=https://storage.googleapis.com/golang
DESTINATION=/usr/local
RELEASE=1.8.1
OS=linux
ARCH=amd64
update-golang.sh: will install golang go1.8.1.linux-amd64 as: /usr/local/go
update-golang.sh: https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz is remote
--2017-04-11 12:27:02--  https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz
Resolving storage.googleapis.com (storage.googleapis.com)... 216.58.222.112
Connecting to storage.googleapis.com (storage.googleapis.com)|216.58.222.112|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 91277742 (87M) [application/x-gzip]
Saving to: ‘go1.8.1.linux-amd64.tar.gz’

go1.8.1.linux-amd64.tar.gz                        100%[==========================================================================================================>]  87,05M  11,2MB/s    in 8,2s

2017-04-11 12:27:11 (10,6 MB/s) - ‘go1.8.1.linux-amd64.tar.gz’ saved [91277742/91277742]

update-golang.sh: remove old link: /usr/local/go
update-golang.sh: untar: rm -rf /usr/local/go1.8.1.linux-amd64
update-golang.sh: untar: tar xf /usr/local/go1.8.1.linux-amd64.tar.gz
update-golang.sh: untar: rm /usr/local/go1.8.1.linux-amd64.tar.gz
update-golang.sh: golang go1.8.1.linux-amd64 installed at: /usr/local/go
update-golang.sh: remember to add /usr/local/go/bin to your PATH
$

Customization

These environment variables are available for customization:

SOURCE=https://storage.googleapis.com/golang
DESTINATION=/usr/local
RELEASE=1.8.1
OS=linux
ARCH=amd64

Example:

$ sudo RELEASE=1.8 ./update-golang.sh

About

update-golang is a script to easily fetch and install new Golang releases with minimum system intrusion

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%