2021-02-06 10:40:52 +00:00
|
|
|
#!/bin/bash -x
|
|
|
|
# Usage: bash install.sh
|
|
|
|
|
|
|
|
# install node.js (=electron node version) via n (https://github.com/tj/n)
|
2021-05-22 07:59:32 +00:00
|
|
|
curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n
|
|
|
|
sudo bash n 14.16.0
|
2021-02-06 10:40:52 +00:00
|
|
|
# Install latest version of n via npm globally
|
2021-05-22 07:59:32 +00:00
|
|
|
# sudo npm install -g n
|
2021-02-06 10:40:52 +00:00
|
|
|
# install desktop entry
|
|
|
|
cp -r ./files/share ~/.local/
|
|
|
|
# install binary files if exists
|
2021-02-06 12:09:25 +00:00
|
|
|
FILE="./files/binary.zip"
|
2021-02-06 10:40:52 +00:00
|
|
|
if [ -e $FILE ]; then
|
|
|
|
unzip $FILE -d ..
|
|
|
|
else
|
|
|
|
echo 'binary.zip not found. plz install manually.'
|
|
|
|
fi
|
|
|
|
|
|
|
|
# build ocoge
|
|
|
|
# prepare for installation electron
|
|
|
|
echo 'arch=armv7l' > ~/.npmrc
|
|
|
|
cd ..
|
|
|
|
npm install
|
|
|
|
|
2021-05-22 07:59:32 +00:00
|
|
|
read -p "Press enter to exit: "
|