21 lines
867 B
Bash
21 lines
867 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# shellcheck disable=SC2154
|
||
|
# Line above disables shellcheck linters:
|
||
|
# * SC2154 - variable referenced but not assigned (false positive, assigned when sourced arch.sh).
|
||
|
|
||
|
golangci_lint_version=1.57.2
|
||
|
|
||
|
# shellcheck disable=SC2086,SC2046,SC2164
|
||
|
cd "$(dirname ${BASH_SOURCE[0]})"
|
||
|
script_path=$(pwd)
|
||
|
|
||
|
# shellcheck disable=SC1091
|
||
|
source "${script_path}/../helpers/arch.sh"
|
||
|
|
||
|
curl -L "https://github.com/golangci/golangci-lint/releases/download/v${golangci_lint_version}/golangci-lint-${golangci_lint_version}-linux-${arch}.tar.gz" -o "/tmp/golangci-lint-${arch}.tar.gz"
|
||
|
file "/tmp/golangci-lint-${arch}.tar.gz"
|
||
|
tar -xf "/tmp/golangci-lint-${arch}.tar.gz" -C /tmp
|
||
|
mv "/tmp/golangci-lint-${golangci_lint_version}-linux-${arch}/golangci-lint" /usr/local/bin
|
||
|
rm -rf "/tmp/golangci-lint-${arch}.tar.gz" "/tmp/golangci-lint-${golangci_lint_version}-linux-${arch}/"
|