10 lines
291 B
Bash
Executable File
10 lines
291 B
Bash
Executable File
#!/bin/bash
|
|
URL=https://golang.org/$(wget -qO - https://golang.org/dl/ | grep downloadBox | grep linux-amd64 | cut -d "\"" -f 4)
|
|
wget -qO - $URL | tar -zx -C /opt/
|
|
for tmp in $(find /opt/go/bin -type f);
|
|
do
|
|
DST=/usr/bin/$(basename $tmp)
|
|
[ -e $DST ] && rm -fr $DST
|
|
ln -s $tmp $DST
|
|
done
|