forked from redraw/puredata-oled-module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·34 lines (24 loc) · 1.08 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
#!/bin/bash
SOFTWARE_TO_INSTALL="puredata pisound-ctl amidiauto pisound-ctl-scripts-puredata"
OLED_DEPS="python3-dev python3-pip libfreetype6-dev libjpeg-dev build-essential libopenjp2-7 libtiff5"
PD_DIR=/home/patch/Pd
sudo apt-get update
sudo apt-get install $SOFTWARE_TO_INSTALL $OLED_DEPS -y
echo "Downloading OLED OSC + Organelle patches"
[ -d /tmp/flagellum ] || git clone --recurse-submodules https://github.com/redraw/flagellum /tmp/flagellum
mkdir -p $PD_DIR/patches
mkdir -p $PD_DIR/externals
rsync -aP /tmp/flagellum/pd/ $PD_DIR/
cp /tmp/flagellum/mother.pd $PD_DIR/patches/organelle/mother.pd
cp -r /tmp/flagellum/oled /usr/local/oled
rm -rf /tmp/flagellum
sudo chown -R patch:patch $PD_DIR
echo "Installing OLED requirements"
sudo pip3 install -r /usr/local/oled/requirements.txt
echo "Installing systemd oled.service"
sudo cp -f /usr/local/oled/oled.service /usr/lib/systemd/system/oled.service
sudo systemctl daemon-reload
sudo systemctl enable oled
echo "Enabling I2C"
sed -i '/dtparam=i2c/c\dtparam=i2c_arm=on,i2c_arm_baudrate=400000' /boot/config.txt
echo "Done! Thank you!"