Merge pull request #1 from Sympatron/main

detect if go is already installed and skip installation
This commit is contained in:
Adam Price 2023-06-03 15:09:05 +01:00 committed by GitHub
commit 64799cce62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,6 +133,7 @@ go_url_arm64="https://go.dev/dl/go1.18.3.linux-arm64.tar.gz"
go_url_armv6="https://go.dev/dl/go1.18.3.linux-armv6l.tar.gz"
function go_install() {
if ! command -v go &> /dev/null; then
## Installing golang
case $system in
amd64)
@ -155,6 +156,9 @@ function go_install() {
export GOCACHE=/root/.cache/go-build
echo "Golang Install Done !"
else
echo "Go is already installed"
fi
}
function agent_compile() {