blob: e679ef4cebb77071aeaa006141ce1b29fe7b5129 [file] [log] [blame]
giolekvac32dd312020-12-17 15:50:12 +04001#!/bin/sh
2
3function check() {
4 name=$1
5 installation_instructions=$2
6 echo "Checking $name"
7 if ! command -v $name &> /dev/null
8 then
9 echo " Please make sure you have it installed and can be found in the PATH."
10 echo " Installation instructions can be found at: $installation_instructions"
11 return 1
12 else
13 echo " Found"
14 return 0
15 fi
16}
17
18missing=0
19check "python" "https://www.python.org/downloads/"
20missing=$((missing + $?))
21check "bazel" "https://docs.bazel.build/versions/3.7.0/install.html"
22missing=$((missing + $?))
23check "docker" "https://k3d.io/#installation"
24missing=$((missing + $?))
25check "k3d" "https://k3d.io/#installation"
26missing=$((missing + $?))
27check "kubectl" "https://kubectl.docs.kubernetes.io/installation/kubectl/"
28missing=$((missing + $?))
29check "helm" "https://helm.sh/docs/intro/install/"
30missing=$((missing + $?))
31
32if (( $missing > 0 ))
33then
34 echo "Some of the requirements are missing, please see instructions on how to install them above."
35 exit 1
36else
37 echo "All requirements met."
38fi