forked from scylladb/scylla-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-dependencies.sh
executable file
·48 lines (40 loc) · 1.41 KB
/
install-dependencies.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
#
# Copyright (C) 2017 ScyllaDB
#
set -eu -o pipefail
LINUX_PKGS="docker-compose jq make moreutils openssl"
source ./env
mkdir -p ${LOCAL_BIN}
if [ -f /etc/os-release ]; then
echo "==> Installing system packages"
DISTRO=$(cat /etc/os-release | grep '^ID=' | cut -d= -f2)||:
case ${DISTRO} in
"fedora")
sudo dnf install ${LINUX_PKGS}
;;
"ubuntu")
echo "> Updating package information from configured sources"
sudo apt-get update
echo "> Installing required system packages"
sudo apt-get install ${LINUX_PKGS}
;;
*)
echo "Your OS ${DISTRO} is not supported, conciser switching to Fedora"
;;
esac
fi
echo "==> Cleaning ${LOCAL_BIN}"
rm -f "${LOCAL_BIN}"/*
echo "==> Installing Go packages at ${LOCAL_BIN}"
export GOBIN=${LOCAL_BIN}
go install github.com/golangci/golangci-lint/cmd/[email protected]
go install github.com/goreleaser/[email protected]
go install github.com/go-enry/go-license-detector/v4/cmd/license-detector@latest
go install github.com/golang/mock/[email protected]
go install github.com/scylladb/gocqlx/v2/cmd/[email protected]
go install golang.org/x/tools/cmd/[email protected]
go install github.com/pressly/sup/cmd/[email protected]
go install github.com/go-swagger/go-swagger/cmd/[email protected]
go install github.com/mikefarah/yq/[email protected]
echo "==> Complete!"