-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_deps.sh
executable file
·61 lines (52 loc) · 1.55 KB
/
install_deps.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
#!/bin/bash
distro=''
packagemgr=''
if [ -f '/etc/fedora-release' ]
then
packagemgr=dnf
distro='fedora'
fi
if [ -f '/etc/centos-release' ]
then
packagemgr=yum
distro='centos'
fi
if [ -z "$packagemgr" ]
then
echo 'Unable to detect package manager... aborting.'
exit 1
fi
# Install dependencies for the rpm build process, including the electron
# package. The electron package sadly is not in the official repositories of
# Fedora / CentOS, so we have to build it via npm.
sudo $packagemgr install rpm-build gcc-c++ python2 git \
clang dbus-devel gtk3-devel libnotify-devel \
libgnome-keyring-devel xorg-x11-server-utils libcap-devel \
cups-devel libXtst-devel alsa-lib-devel libXrandr-devel \
GConf2-devel nss-devel libXScrnSaver make \
-y
# CentOS doesn't ship with an ideal version of node and npm, so we download and
# install them on our own.
if [ $distro == 'centos' ]
then
sudo $packagemgr install epel-release -y
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
sudo $packagemgr install nodejs -y
sudo npm install npm@latest -g
fi
# Fedora has a decent version for node and npm, we can simply install them.
if [ $distro == 'fedora' ]
then
sudo $packagemgr install node npm -y
fi
# Install yarn
if [ ! -f /etc/yum.repos.d/yarn.repo ]
then
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo $packagemgr install yarn -y
fi
# install electron
if [ ! -f /usr/local/bin/electron ]
then
sudo yarn global add electron
fi