forked from airbytehq/airbyte-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck_requirements.sh
executable file
·68 lines (68 loc) · 1.96 KB
/
check_requirements.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
printf "Docker ";
if [[ $(which docker) && $(docker --version) ]]; then
printf "is installed"
else
printf "needs to be installed"
fi;
printf "\n";
desired="14"
printf "Java ";
if [[ "$(which java)" && "$(java --version)" ]];
then
printf "installed"
str="$(java --version)"
IFS=' ' read -ra array <<< "${str}"
version="${array[1]}"
if [[ "${version}" > "${desired}" || "${version}" == "${desired}" ]];
then
printf " and functional"
else
printf " but not functional, must have version ${desired} at least"
fi
else
printf "not installed, must have version ${desired} at least"
fi;
printf "\n";
desired="20.1"
printf "Pip ";
if [[ "$(which pip)" && "$(pip --version)" ]];
then
printf "installed"
str="$(pip --version)"
IFS=' ' read -ra array <<< "${str}"
version="${array[1]}"
if [[ "${version}" > "${desired}" || "${version}" == "${desired}" ]];
then
printf " and functional"
else
printf " but not functional, must have version ${desired} at least"
fi
else
printf "not installed, must have version ${desired} at least"
fi;
printf "\n";
desired="3.9.11"
printf "Python ";
if [[ "$(which python3)" && "$(python3 --version)" ]];
then
printf "installed"
str="$(python3 --version)"
IFS=' ' read -ra array <<< "${str}"
version="${array[1]}"
if [[ "${version}" > "${desired}" || "${version}" == "${desired}" ]];
then
printf " and functional"
else
printf " but not functional, must have version ${desired} at least"
fi
else
printf "not installed, must have version ${desired} at least"
fi;
printf "\n";
printf "JQ ";
if [[ $(which jq) && $(jq --version) ]]; then
printf "is installed"
else
printf "needs to be installed"
fi;
printf "\n";