This repository has been archived by the owner on May 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathinstall_deps.sh
executable file
·60 lines (51 loc) · 1.59 KB
/
install_deps.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
#!/bin/bash
sudo apt-get -y update
sudo apt-get -y install git-core build-essential python-setuptools python-pyaudio python3-pyaudio sox make pulseaudio alsa-utils flac
sudo easy_install pip
if [ -f ~/.asoundrc ] ; then
echo "Backing up .asoundrc"
cp ~/.asoundrc "~/.asoundrc.bak.$(date +%s)"
fi
cp ../audio_interface/.asoundrc ~/.asoundrc
libs_dir="/opt/home_libs"
sudo mkdir -p $libs_dir
sudo chown pi:pi $libs_dir
## Swig
#sudo apt-get -y install swig3.0 # apt-get version outdated, have to build from source
#TODO, add validated swig url or use git
# git clone https://github.com/swig/swig
sudo apt-get -y install libpcre3 libpcre3-dev autoconf python-dev byacc flex
cd $libs_dir
wget http://ufpr.dl.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz
tar -xzf swig-3.0.12.tar.gz
cd swig-3.0.12/
./configure
make
sudo make install
## Snowboy Wakeword
cd $libs_dir
sudo apt-get -y install libatlas-base-dev
sudo pip install pyaudio
git clone https://github.com/kkbankol-ibm/snowboy/
#git clone https://github.com/Kitt-AI/snowboy/
cd snowboy/swig/Python
make
## wiringPi
cd $libs_dir
git clone git://git.drogon.net/wiringPi
cd wiringPi
git pull origin master
./build
## 433Utils
cd $libs_dir
git clone --recursive git://github.com/ninjablocks/433Utils.git
cd 433Utils/RPi_utils
make
# Install node / npm if needed
if [[ ! "$(command -v npm)" || ! "$(command -v node)" ]] ; then
echo "Node / npm is not installed, running install script"
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y build-essential
sudo apt-get install -y nodejs
fi
npm install mqtt