2023-05-09 14:16:12 +04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# shellcheck disable=SC2154
|
|
|
|
# Line above disables shellcheck linters:
|
|
|
|
# * SC2154 - variable referenced but not assigned (false positive, assigned when sourced arch.sh).
|
|
|
|
|
|
|
|
set -xe
|
|
|
|
|
2023-05-09 18:55:06 +04:00
|
|
|
go_version=1.20.4
|
2023-05-09 14:16:12 +04:00
|
|
|
|
|
|
|
# shellcheck disable=SC2086,SC2046,SC2164
|
|
|
|
cd $(dirname ${BASH_SOURCE[0]})
|
|
|
|
script_path=$(pwd)
|
|
|
|
|
|
|
|
# shellcheck disable=SC1091
|
|
|
|
source "${script_path}/../helpers/arch.sh"
|
|
|
|
|
|
|
|
curl "https://dl.google.com/go/go${go_version}.linux-${arch}.tar.gz" -o "/tmp/go-${arch}.tar.gz"
|
|
|
|
file "/tmp/go-${arch}.tar.gz"
|
|
|
|
tar -xf "/tmp/go-${arch}.tar.gz" -C /usr/local/
|
|
|
|
rm "/tmp/go-${arch}.tar.gz"
|
|
|
|
ln -s /usr/local/go/bin/* /usr/local/bin
|