arkanum/install/install-golang.sh
OCram85 d84a3b7e6e
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/master Pipeline was successful
ci/woodpecker/push/next Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/master Pipeline was successful
ci/woodpecker/pr/next Pipeline was successful
add individual install scripts
2022-11-04 11:50:01 +01:00

20 lines
559 B
Bash

#!/bin/bash
set -e
if [[ -z "$1" ]]
then
GOVERSION="1.19.3"
else
GOVERSION="$1"
fi
echo "**** downloading golang ($GOVERSION)****"
curl -fsSL "https://go.dev/dl/go$GOVERSION.linux-amd64.tar.gz" -o /tmp/golang.tar.gz
echo "**** installing golang ($GOVERSION)****"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf /tmp/golang.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee -a /etc/bash.bashrc > /dev/null
echo "**** cleaning up ****"
rm -f /tmp/golang.tar.gz
echo "**** done. ****"
echo "**** please reload bashprofile to finalize ****"