-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
90 lines (65 loc) · 2.2 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
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash
if [ `whoami` != root ]; then
echo "Please run with sudo!"
exit 1
fi
WORKDIR="$(dirname "$0")"
cd $WORKDIR
# ------ Install files to the correct location -------
# ----------------------------------------------------
# Copy application
echo "Copy appdate"
mkdir -p "/usr/local/bin/bluevan/"
cp -v -r * "/usr/local/bin/bluevan"
chmod 755 -R "/usr/local/bin/bluevan"
cp bluevan.desktop ~/Desktop/
cp portrait.desktop ~/Desktop/
cp landscape.desktop ~/Desktop/
chmod +x ~/Desktop/bluevan.desktop
chmod +x ~/Desktop/landscape.desktop
chmod +x ~/Desktop/portrait.desktop
chmod -R 777 ~/Desktop/bluevan.desktop
chmod -R 777 ~/Desktop/landscape.desktop
chmod -R 777 ~/Desktop/portrait.desktop
chown kaushlesh ~/Desktop/bluevan.desktop
chown kaushlesh ~/Desktop/landscape.desktop
chown kaushlesh ~/Desktop/portrait.desktop
# Be sure normal users can't read our config file!
#chmod 600 $DESTPATH_APPDATA"settings.ini"
# --- Install the required distribution packages -----
# ----------------------------------------------------
#echo "Installing required distribution packages"
#apt-get update
if [ ! -e /usr/bin/pip3 ]; then
apt-get -y install python3-pip
fi
#if [ ! -e /usr/bin/ffprobe ]; then
# apt-get -y install ffmpeg
#fi
#if [ ! -e /usr/bin/omxplayer ]; then
# apt-get -y install omxplayer
#fi
# --------- Install required python packages ---------
# ----------------------------------------------------
echo "Installing required python packages"
pip3 show evdev 1>/dev/null
if [ $? != 0 ]; then
pip3 install evdev==1.2.0
fi
# ---------------- Systemd service -------------------
# ----------------------------------------------------
echo "Installing 'Bluevan' as a systemd service"
cp -v bluevan.service "/lib/systemd/system/"
systemctl enable bluevan.service
systemctl start bluevan.service
systemctl daemon-reload
# ---------------------- pipng -----------------------
# ----------------------------------------------------
#echo "Installing and building pipng"
#git clone https://github.com/raspicamplayer/pipng.git
#cd ./pipng/ && make && make install
#cd ../
#rm -rf pipng
# --------------------- Done! ------------------------
# ----------------------------------------------------
echo "Done!"