-
Notifications
You must be signed in to change notification settings - Fork 3
/
install
executable file
·38 lines (31 loc) · 944 Bytes
/
install
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
#!/bin/bash
# Usage `curl https://raw.githubusercontent.com/Memristor-Robotics/mep-master/master/install | sh`
# Install Node.js
if [ -f "/etc/arch-release" ]; then
# Arch distributions
sudo pacman -S nodejs npm --noconfirm
sudo pacman -S git --noconfirm
else
# Debian distros
# sudo apt update
sudo apt install -y git
if [ "$(uname -a | grep armv6l)" ]; then
# ARMv6 (Raspberry Pi Zero (W))
curl https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v8.9.0.sh | sh
else
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt install -y nodejs
fi
fi
# Install global Node.js modules
sudo npm install -g mocha node-gyp
# Clone the repo
if [ -d "mep-master" ]; then
sudo rm -rf mep-master
fi
git clone https://github.com/Memristor-Robotics/mep-master.git --depth 1
cd mep-master
# Install dependencies
npm install
# Test
npm test