aboutsummaryrefslogtreecommitdiff
path: root/bin/postinstall.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/postinstall.sh')
-rw-r--r--bin/postinstall.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/postinstall.sh b/bin/postinstall.sh
new file mode 100644
index 0000000..85a77e7
--- /dev/null
+++ b/bin/postinstall.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+CWD=$PWD
+. "$CWD/bin/bashfuncs.sh"
+
+# Create virtualenv
+header "Create python virtualenv and install dependencies"
+execCommand "rm -rf $CWD/NeoRuntime/Runtime/venv"
+execCommand "pip3 install virtualenv"
+execCommand "virtualenv -p /usr/bin/python3 \"$CWD/NeoRuntime/Runtime/venv\""
+header "Attempting to install the rpi_ws281x library, if you want to actually control some leds you need this. Don't worry if not."
+execCommand "source \"$CWD/NeoRuntime/Runtime/venv/bin/activate\" && pip install rpi_ws281r" 1
+