-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_prerequisites.sh
executable file
·74 lines (72 loc) · 1.6 KB
/
install_prerequisites.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
69
70
71
72
73
74
#!/bin/bash
os=$(uname -s)
case $os in
"Darwin")
brew install \
cmake \
coreutils \
cscope \
ctags \
git \
gnu-sed \
gradle \
grep \
hub \
macvim \
maven \
node \
openssl \
pstree \
python \
python3 \
readline \
sqlite \
tmux \
tree \
;;
"Linux" )
packages=(
"bc" # used by tmux configuration
"cmake"
"git-all"
"tmux"
"tree"
"vim"
"xdg-utils" # `tmux-open` plugin appears to use `xdg-open`
)
if command -v yum &> /dev/null; then
install_cmd=("yum" "install" "-y")
packages+=(
"cmake"
"git-all"
"ShellCheck"
)
else
install_cmd=("apt-get" "install" "-y")
packages+=(
"bat" # enhanced cat
"build-essential"
"python3-dev"
"python3-pip"
"shellcheck"
)
fi
install_cmd+=( "${packages[@]}" )
# check if sudo is needed
if [ "$(id -u)" == "0" ]; then
"${install_cmd[@]}"
else
sudo "${install_cmd[@]}"
fi
;;
esac
python3 -m pip install \
black \
cmake_format \
flake8 \
gitpython \
isort \
mypy \
pydocstyle \
pylint \
wemake-python-styleguide