@@ -61,46 +61,61 @@ You can use the 'remove' option to undo update-golang.sh work:
61
61
Example
62
62
=======
63
63
64
- $ sudo ./update-golang.sh
65
- update-golang.sh: version 0.12
64
+ lab@ubu1:~$ go
65
+ The program 'go' can be found in the following packages:
66
+ * golang-go
67
+ * gccgo-go
68
+ Try: sudo apt install <selected package>
69
+ lab@ubu1:~$
70
+ lab@ubu1:~$ git clone https://github.com/udhos/update-golang
71
+ Cloning into 'update-golang'...
72
+ remote: Counting objects: 468, done.
73
+ remote: Total 468 (delta 0), reused 0 (delta 0), pack-reused 468
74
+ Receiving objects: 100% (468/468), 63.60 KiB | 140.00 KiB/s, done.
75
+ Resolving deltas: 100% (244/244), done.
76
+ lab@ubu1:~$
77
+ lab@ubu1:~$ cd update-golang/
78
+ lab@ubu1:~/update-golang$ sudo ./update-golang.sh
79
+ update-golang.sh: version 0.15
80
+ update-golang.sh: find_latest: found last release: 1.10.2
66
81
update-golang.sh: user: uid=0(root) gid=0(root) groups=0(root)
67
82
update-golang.sh: SOURCE=https://storage.googleapis.com/golang
68
83
update-golang.sh: DESTINATION=/usr/local
69
- update-golang.sh: RELEASE=1.9 .2
84
+ update-golang.sh: RELEASE=1.10 .2
70
85
update-golang.sh: OS=linux
71
86
update-golang.sh: ARCH_PROBE=uname -m
72
87
update-golang.sh: ARCH=amd64
73
88
update-golang.sh: PROFILED=/etc/profile.d/golang_path.sh
74
89
update-golang.sh: CACHE=/usr/local
75
90
update-golang.sh: GOPATH=
76
91
update-golang.sh: DEBUG=
77
- update-golang.sh: will install golang go1.9 .2.linux-amd64 as: /usr/local/go
78
- update-golang.sh: https://storage.googleapis.com/golang/go1.9 .2.linux-amd64.tar.gz is remote
79
- --2017-11-26 21:32:41 -- https://storage.googleapis.com/golang/go1.9 .2.linux-amd64.tar.gz
80
- Resolving storage.googleapis.com (storage.googleapis.com)... 216.58.202.80
81
- Connecting to storage.googleapis.com (storage.googleapis.com)|216.58.202.80 |:443... connected.
92
+ update-golang.sh: will install golang go1.10 .2.linux-amd64 as: /usr/local/go
93
+ update-golang.sh: https://storage.googleapis.com/golang/go1.10 .2.linux-amd64.tar.gz is remote
94
+ --2018-05-08 11:08:00 -- https://storage.googleapis.com/golang/go1.10 .2.linux-amd64.tar.gz
95
+ Resolving storage.googleapis.com (storage.googleapis.com)... 172.217.162.176, 2800:3f0:4001:817::2010
96
+ Connecting to storage.googleapis.com (storage.googleapis.com)|172.217.162.176 |:443... connected.
82
97
HTTP request sent, awaiting response... 200 OK
83
- Length: 104247844 (99M ) [application/octet-stream]
84
- Saving to: ‘/usr/local/go1.9 .2.linux-amd64.tar.gz’
98
+ Length: 132481801 (126M ) [application/octet-stream]
99
+ Saving to: ‘/usr/local/go1.10 .2.linux-amd64.tar.gz’
85
100
86
- /usr/local/go1.9 .2.linux-amd64.tar.gz 100%[=====================================================================================>] 99.42M 11.3MB /s in 8.8s
101
+ /usr/local/go1.10 .2.linux-amd64.tar.gz 100%[=====================================================================================>] 126.34M 10.4MB /s in 12s
87
102
88
- 2017-11-26 21:32:51 (11.3 MB/s) - ‘/usr/local/go1.9 .2.linux-amd64.tar.gz’ saved [104247844/104247844 ]
103
+ 2018-05-08 11:08:13 (10.6 MB/s) - ‘/usr/local/go1.10 .2.linux-amd64.tar.gz’ saved [132481801/132481801 ]
89
104
90
105
update-golang.sh: remove_old_link: not found symlink for old install
91
- update-golang.sh: untar: tar -x -f /usr/local/go1.9 .2.linux-amd64.tar.gz
106
+ update-golang.sh: untar: tar -x -f /usr/local/go1.10 .2.linux-amd64.tar.gz
92
107
update-golang.sh: path: removing old settings from: /etc/profile.d/golang_path.sh
93
108
update-golang.sh: path: issuing new /usr/local/go/bin to /etc/profile.d/golang_path.sh
94
109
update-golang.sh: path: issuing /home/lab/go/bin to /etc/profile.d/golang_path.sh
95
- update-golang.sh: golang go1.9 .2.linux-amd64 installed at: /usr/local/go
110
+ update-golang.sh: golang go1.10 .2.linux-amd64 installed at: /usr/local/go
96
111
update-golang.sh: testing: /usr/local/go/bin/go version
97
- update-golang.sh: go version go1.9 .2 linux/amd64
112
+ update-golang.sh: go version go1.10 .2 linux/amd64
98
113
update-golang.sh: /usr/local/go/bin/go version: SUCCESS
99
- update-golang.sh: testing: /usr/local/go/bin/go run /tmp/hello-tmplBkHb1Ej .go
114
+ update-golang.sh: testing: /usr/local/go/bin/go run /tmp/hello-tmpkpkMTIlc .go
100
115
update-golang.sh: hello, world
101
- update-golang.sh: /usr/local/go/bin/go run /tmp/hello-tmplBkHb1Ej .go: SUCCESS
102
- update-golang.sh: cleanup: /tmp/tmp.2pzVpWkExd
103
- $
116
+ update-golang.sh: /usr/local/go/bin/go run /tmp/hello-tmpkpkMTIlc .go: SUCCESS
117
+ update-golang.sh: cleanup: /tmp/tmp.IReSzeOpfA
118
+ lab@ubu1:~/update-golang $
104
119
105
120
Customization
106
121
=============
0 commit comments