forked from EmbeddedRPC/erpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_dependencies.sh
executable file
·36 lines (34 loc) · 1.02 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
#!/bin/bash
# exit when any command fails
set -e
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*)
echo "Linux os detected."
DEBIAN_FRONTEND=noninteractive sudo apt-get update -qq --yes
echo "Installing dependencies."
DEBIAN_FRONTEND=noninteractive sudo apt-get install python3 bison flex --yes
if [ "$1" = "clang" ]; then
echo "Installing clang compiler."
DEBIAN_FRONTEND=noninteractive sudo apt-get install clang
else
echo "Installing default gnu compiler."
DEBIAN_FRONTEND=noninteractive sudo apt-get install gcc g++
fi
sudo pip3 install -U pytest pyyaml
sudo apt-get autoremove --yes
;;
Darwin*)
echo "Mac os detected."
brew update
echo "Installing dependencies."
brew install python3 bison flex -v -f 2>&1
sudo pip3 install tornado
sudo pip3 install --user nose
sudo pip3 install pytest --upgrade --ignore-installed six
sudo pip3 install pyyaml
;;
*)
echo "Unknown or currently unsupported os: ${unameOut}"
;;
esac