-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·42 lines (37 loc) · 835 Bytes
/
bootstrap.sh
File metadata and controls
executable file
·42 lines (37 loc) · 835 Bytes
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
#!/bin/sh -xe
# keep in sync with .travis.yml
bootstrap_deb () {
apt-get update
# virtualenv binary can be found in different packages depending on
# distro version
virtualenv_bin_pkg="virtualenv"
if ! apt-cache show -qq "${virtualenv_bin_pkg}" >/dev/null 2>&1; then
virtualenv_bin_pkg="python-virtualenv"
fi
apt-get install -y --no-install-recommends \
ca-certificates \
gcc \
libssl-dev \
libffi-dev \
python \
python-dev \
"${virtualenv_bin_pkg}"
}
bootstrap_rpm () {
installer=$(command -v dnf || command -v yum)
"${installer?}" install -y \
ca-certificates \
gcc \
libffi-devel \
openssl-devel \
python \
python-devel \
python-virtualenv
}
if [ -f /etc/debian_version ]
then
bootstrap_deb
elif [ -f /etc/redhat-release ]
then
bootstrap_rpm
fi