mirror of
https://github.com/ocogeclub/ocoge.git
synced 2024-11-21 23:29:48 +00:00
35 lines
729 B
Bash
35 lines
729 B
Bash
#!/bin/bash -x
|
|
# Usage: bash install.sh
|
|
|
|
NODEJS=14.17.0
|
|
|
|
# install lgpio (and python3)
|
|
sudo apt update
|
|
sudo apt install python3 swig python3-dev python3-setuptools -y
|
|
wget http://abyz.me.uk/lg/lg.zip
|
|
unzip lg.zip
|
|
rm lg.zip
|
|
cd lg
|
|
make
|
|
sudo make install
|
|
cd ..
|
|
|
|
# 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 $NODEJS
|
|
# 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
|