Hogere versie Go

This commit is contained in:
2025-11-24 11:20:47 +00:00
parent e971d66603
commit 90c1f6aa0e

View File

@@ -1,15 +1,28 @@
#!/bin/bash #!/bin/bash
echo ""; echo "";
echo "==================================="; set -e
echo "Install golang-go..."; GO_VERSION=1.22.5 # of een andere recente 1.22.x / 1.23.x
echo "==================================="; echo "==================================="
apt-get -y install golang-go; echo "Installeren van Go ${GO_VERSION}..."
if [ $? == 0 ] ; then echo "==================================="
echo 'golang-go installed' apt-get update
else apt-get -y install curl ca-certificates
echo 'ERROR: Installing golang-go NOT succesfull!' cd /tmp
exit curl -LO https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz
fi # Oude Go-installatie weghalen (indien aanwezig)
rm -rf /usr/local/go
# Nieuwe Go installeren
tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
# Go in PATH zetten voor dit script
export PATH=/usr/local/go/bin:$PATH
go version # zou nu go1.22.x moeten tonen
#apt-get -y install golang-go;
#if [ $? == 0 ] ; then
# echo 'golang-go installed'
#else
# echo 'ERROR: Installing golang-go NOT succesfull!'
# exit
#fi
echo ""; echo "";
echo "==================================="; echo "===================================";
echo "Installing mailhog..."; echo "Installing mailhog...";