From f7e7eb791e9bd9222121d441afb527d6b3d36896 Mon Sep 17 00:00:00 2001 From: "Bofu Chen (bafu)" Date: Thu, 9 May 2019 11:00:38 +0100 Subject: [PATCH] Add RPi devenv setup utility. Signed-off-by: Bofu Chen (bafu) --- utils/setup-bn-devenv-rpi.sh | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 utils/setup-bn-devenv-rpi.sh diff --git a/utils/setup-bn-devenv-rpi.sh b/utils/setup-bn-devenv-rpi.sh new file mode 100755 index 0000000..2e6e4b8 --- /dev/null +++ b/utils/setup-bn-devenv-rpi.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# Setup BerryNet devenv on RPi3. + +install_system_dependencies() { + sudo apt-get update + sudo apt-get install -y \ + curl \ + fswebcam \ + git \ + imagemagick \ + libkrb5-dev \ + libyaml-dev \ + libzmq3-dev \ + lsb-release \ + mongodb \ + mosquitto \ + mosquitto-clients \ + python3-dev \ + python3-pip \ + supervisor \ + wget + sudo service mongodb start + sudo -H pip3 install --timeout 60 cython + sudo -H pip3 install --timeout 60 logzero + sudo -H pip3 install --timeout 60 paho-mqtt + sudo -H pip3 install --timeout 60 watchdog +} + +install_berrynet_repository() { + sudo apt update + sudo apt install -y dirmngr + pushd /etc/apt/sources.list.d + sudo wget https://raw.githubusercontent.com/DT42/BerryNet/master/config/berrynet.list + popd + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv C0C4CC4C + sudo apt update +} + +install_opencv() { + sudo apt install -y python3-opencv +} + +main() { + install_system_dependencies + install_berrynet_repository + install_opencv +} + +main