-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathinstall.sh
More file actions
62 lines (47 loc) · 2.03 KB
/
install.sh
File metadata and controls
62 lines (47 loc) · 2.03 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# node-omxplayer-sync
# Ben Moren
# https://github.com/bmoren/node-omxplayer-sync/
# http://benmoren.com
# GNU General Public License v3.0
#!/usr/bin/env bash
#install rsync on the client for the deploy script, uncomment if you are going to do some development, not needed for a standard deployment.
#sudo --yes --force-yes apt-get install rsync
#create the folder for the project to live
# mkdir ~/node-omxplayer-sync
########
#get pi up to date!
echo "<<<<<<<<<<<< UPDATING PI >>>>>>>>>>>>"
sudo apt-get --yes update
sudo apt-get --yes upgrade
#install nvm & node.js stable
echo "<<<<<<<<<<<< INSTALLING NVM NODE AND NPM >>>>>>>>>>>>"
wget https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh
chmod +x ~/install.sh
./install.sh
rm ~/install.sh
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install stable
#install git and clone this repo
echo "<<<<<<<<<<<< INSTALLING GIT AND CLONING REPO >>>>>>>>>>>>"
sudo apt-get --yes install git
git clone https://github.com/bmoren/node-omxplayer-sync.git
#install node dependencies
echo "<<<<<<<<<<<< INSTALLING DEPENDENCIES >>>>>>>>>>>>"
cd ~/node-omxplayer-sync
npm install
#install forever and append startup command to bashrc ... dont forget to change the filename to your video file
echo "<<<<<<<<<<<< INSTALLING FOREVER AND APPENDING .BASHRC >>>>>>>>>>>>"
npm install forever -g
echo 'forever start ~/node-omxplayer-sync/omx-sync.js ~/node-omxplayer-sync/test.mp4' >> ~/.bashrc
#install omxplayer
echo "<<<<<<<<<<<< INSTALLING OMXPLAYER>>>>>>>>>>>>"
sudo apt-get --yes install omxplayer
#install usb-mount so we can easily get files into the system.
echo "<<<<<<<<<<<< INSTALLING USBMOUNT >>>>>>>>>>>>"
sudo apt-get --yes install usbmount
echo "<<<<<<<<<<<< COMPLETE >>>>>>>>>>>>"
# set the login user to PI
echo "<<<<<<<<<<<< DONT FORGET TO SET CONSOLE TO AUTOLOGIN USER pi WITH: sudo raspi-config >>>>>>>>>>>>"
# sudo raspi-config