-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
58 lines (45 loc) · 1.18 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
#!/bin/bash
BASEPATH="$(dirname "$(readlink -f "$0")")"
DISTRO=''
echo "$BASEPATH"
cd "$BASEPATH"
## xBIAN (DEBIAN / RASPBIAN / UBUNTU)
if [[ $(command -v apt) ]]; then
DISTRO='xbian'
echo "Distribution: $DISTRO"
echo "Not supported yet."
exit 1
## ARCH Linux
elif [[ $(command -v pacman) ]]; then
DISTRO='arch'
echo "Distribution: $DISTRO"
# NodeJS
pacman -S nodejs npm --noconfirm
# MPV (RC2)
pacman -Sy mpv --noconfirm
pacman -S freetype2 fribidi fontconfig yasm git autoconf pkg-config libtool \
lua luajit libvdpau libva libxv libjpeg libxkbcommon libxrandr libv4l libxss libcaca sdl2 \
base-devel libx264 mesa fbida libbluray alsa-lib alsa-firmware ttf-roboto --noconfirm --needed
pacman -S llvm-libs --noconfirm
# PIGPIO
pikaur -Sy --noconfirm pigpio
## Plateform not detected ...
else
echo "Distribution not detected:"
echo "this script needs APT or PACMAN to run."
echo ""
echo "Please install manually."
exit 1
fi
# NodeJS / PM2
npm install -g n
n stable
hash -r
npm install -g pm2
rm -Rf ~/.pm2
mkdir -p /data/var/pm2
ln -s /data/var/pm2 ~/.pm2
# INSTALL
npm install
# PM2 START & SAVE
# TODO