Memristor-Robotics/mep-master

View on GitHub
install

Summary

Maintainability
Test Coverage
#!/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