mirror of
https://github.com/ocogeclub/ocoge.git
synced 2024-11-25 08:59:49 +00:00
36 lines
901 B
Bash
36 lines
901 B
Bash
#!/bin/bash -x
|
|
# Usage: bash install.sh
|
|
|
|
NODEVER=16.5.0
|
|
#14.17.0
|
|
|
|
# Enable i2c bus 6 to use the pins NOT pulledup
|
|
echo 'dtoverlay=i2c6,pins_22_23' | sudo tee -a /boot/config.txt
|
|
|
|
# install some packages used in ocoge
|
|
sudo apt update
|
|
sudo apt install fswebcam -y
|
|
# enable pigpiod service
|
|
sudo systemctl enable pigpiod.service
|
|
sudo systemctl start pigpiod.service
|
|
|
|
# install node.js (=electron node version) via n (https://github.com/tj/n)
|
|
curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n
|
|
sudo bash n $NODEVER
|
|
# install python code formatter
|
|
python3 -m pip install black
|
|
# install desktop entry
|
|
cp -r ./files/share ~/.local/
|
|
# install binary files if exists
|
|
FILE="./files/binary.zip"
|
|
if [ -e $FILE ]; then
|
|
unzip $FILE -d ..
|
|
else
|
|
echo 'binary.zip not found. plz install manually.'
|
|
fi
|
|
|
|
# build ocoge
|
|
cd ..
|
|
npm install
|
|
|
|
echo 'Installation finished. To use i2c devices, reboot computer.' |