Update init.sh

This commit is contained in:
Bkeenke 2024-04-30 00:08:16 +03:00 committed by GitHub
parent ab93f5163e
commit 3bd6f298f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -85,12 +85,12 @@ install_package () {
install_go() { install_go() {
rm -rf /opt/go && mkdir -p /opt/go && cd /opt/go rm -rf /opt/go && mkdir -p /opt/go && cd /opt/go
wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz wget https://go.dev/dl/go1.22.2.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.0.linux-amd64.tar.gz rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.2.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile
source /etc/profile && source ~/.profile source /etc/profile && source ~/.profile
if go version >/dev/null 2>&1; then if go version >/dev/null 2>&1; then
echo "Golang installed" colorized_echo green "golang install"
else else
colorized_echo red "golang not found" colorized_echo red "golang not found"
exit 1 exit 1