-
Notifications
You must be signed in to change notification settings - Fork 17
/
homebridge-install
executable file
·31 lines (27 loc) · 1.43 KB
/
homebridge-install
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
if [ ! -d /usr/local/lib/node_modules/homebridge ]; then
sudo npm install -g --unsafe-perm [email protected]
else
HB_CURRENT_VERSION=`npm ll -pg --depth=0 homebridge | grep -o "@.*:" | sed 's/.$//; s/^.//'`
if [ "$HB_CURRENT_VERSION" != "1.1.0" ]; then
sudo npm install -g --unsafe-perm [email protected]
fi
fi
if [ ! -d /usr/local/lib/node_modules/homebridge-http-securitysystem ]; then
sudo npm install -g [email protected]
fi
if [ ! -d /usr/local/lib/node_modules/homebridge-http-contact-sensor ]; then
sudo npm install -g [email protected]
fi
if [ ! -d /usr/local/lib/node_modules/homebridge-http-pir-motion-sensor ]; then
sudo npm install -g [email protected]
fi
if [ ! -d /usr/local/lib/node_modules/homebridge-camera-ffmpeg ]; then
sudo curl -Lf# https://github.com/homebridge/ffmpeg-for-homebridge/releases/latest/download/ffmpeg-debian-$(uname -m).tar.gz | sudo tar xzf - -C / --no-same-owner
sudo npm install -g [email protected]
else
CAM_CURRENT_VERSION=`npm ll -pg --depth=0 homebridge-camera-ffmpeg | grep -o "@.*:" | sed 's/.$//; s/^.//'`
if [ "$CAM_CURRENT_VERSION" != "1.2.2" ]; then
sudo curl -Lf# https://github.com/homebridge/ffmpeg-for-homebridge/releases/latest/download/ffmpeg-debian-$(uname -m).tar.gz | sudo tar xzf - -C / --no-same-owner
sudo npm install -g [email protected]
fi
fi