forked from josephernest/SamplerBox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_requeriments
65 lines (54 loc) · 1.56 KB
/
install_requeriments
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
#!/usr/bin/env bash
###################################################################################################
# Check for root privileges
if [ "$(id -u)" != "0" ]; then
printf "This script must be executed with administration privileges.\n\n"
exit 1
fi
###################################################################################################
### Functions
# APT update function
apt_update()
{
echo "-------------------------------------------------"
echo " Updating Repositories"
echo "-------------------------------------------------"
apt-get update
echo ""
}
# APT install package function
apt_install()
{
if [ $# -gt 0 ]; then
echo "-------------------------------------------------"
echo " Installing ${1} package"
echo "-------------------------------------------------"
apt-get -y install $1
if [[ $? != 0 ]]; then
printf "Error: Can't install ${1} package.\n\n"
exit 1
fi
echo ""
fi
}
###################################################################################################
### Installation
# APT Packages
apt_update
apt_install git
apt_install python3
apt_install python3-dev
apt_install python3-pip
apt_install cython
apt_install python3-smbus
apt_install portaudio19-dev
apt_install libportaudio2
apt_install libffi-dev
# PIP Modules
pip install -r requirements.txt
if [[ $? != 0 ]]; then
printf "Error: pip requirements installation fail.\n\n"
exit 1
fi
printf "\nEverything has been successfully installed.\n\n"
exit 0