-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathinstall.sh
executable file
·59 lines (47 loc) · 1.6 KB
/
install.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
#!/bin/bash
# setup & installation
echo '\n\n'
echo '---------------------------------'
echo 'Installing MATRIX Dependencies...'
echo '---------------------------------'
curl https://apt.matrix.one/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.matrix.one/raspbian $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/matrixlabs.list
# Update packages and install
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -y install git cmake g++;
sudo apt-get -y install libzmq3-dev;
# bluetooth
sudo apt-get -y install libudev-dev bluetooth bluez blueman libusb-1.0-0-dev;
# auth bluetooth for node
sudo setcap cap_net_raw+eip $(eval readlink -f `which node`);
# creator code needs force until it can be authenticated
#sudo apt-get -y --force-yes install malos-eye
sudo apt-get -y --force-yes install matrixio-malos \
matrixio-malos-wakeword \
matrixio-malos-zigbee
# Install npm (doesn't really matter what version, apt-get node is v0.10...)
sudo apt-get -y install npm;
# n is a node version manager
sudo npm install -g n;
# node 6.7 is the latest target node version, also installs new npm
sudo n 6.7.0;
# install matrix os
echo '\n\n'
echo '---------------------------------'
echo 'Installing MATRIX API Services...'
echo '---------------------------------'
echo '\n'
git clone https://github.com/matrix-io/matrix-os.git;
cd matrix-os;
git submodule update --init;
npm install;
npm rebuild;
# Reboot!
echo '\n\n'
echo '---------------------------------'
echo 'Rebooting... Please re-connect to'
echo ' your Raspberry Pi in a minute. '
echo '---------------------------------'
echo '\n'
sudo reboot;