Compare commits
3 Commits
0cbb8a326d
...
e8cc922c61
Author | SHA1 | Date | |
---|---|---|---|
e8cc922c61 | |||
1740c9b5ee | |||
4d39769cac |
@ -362,8 +362,6 @@ homedir="$(getent passwd $SUDO_USER | cut -d: -f6)"
|
|||||||
debug=false
|
debug=false
|
||||||
downloadall=false
|
downloadall=false
|
||||||
usezsh=""
|
usezsh=""
|
||||||
echo $homedir
|
|
||||||
sleep 10
|
|
||||||
|
|
||||||
# run the program
|
# run the program
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
|
@ -5,12 +5,11 @@ wget https://go.dev/dl/
|
|||||||
latestversionsh="$(grep -w 'downloadBox' "index.html")"
|
latestversionsh="$(grep -w 'downloadBox' "index.html")"
|
||||||
latestversionsh=$(echo "$latestversionsh" | grep 'linux')
|
latestversionsh=$(echo "$latestversionsh" | grep 'linux')
|
||||||
|
|
||||||
a="$(grep -w 'data-linux="' "download")"
|
|
||||||
latestversionsh=${latestversionsh#*'href="'}
|
latestversionsh=${latestversionsh#*'href="'}
|
||||||
latestversionsh=${latestversionsh%'">'*}
|
latestversionsh=${latestversionsh%'">'*}
|
||||||
|
|
||||||
# Download latest golang version
|
# Download latest golang version
|
||||||
wget "https://go.dev"$latestversionsh
|
sudo -u $SUDO_USER wget "https://go.dev"$latestversionsh
|
||||||
|
|
||||||
# Remove any previous Go installation then extract the archive
|
# Remove any previous Go installation then extract the archive
|
||||||
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.19.1.linux-amd64.tar.gz
|
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.19.1.linux-amd64.tar.gz
|
||||||
|
Loading…
x
Reference in New Issue
Block a user