forked from okigan/awscurl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·41 lines (34 loc) · 1.07 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
#!/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
set -o xtrace
OS_RELEASE=$(. /etc/os-release; echo "${NAME}")
if [ "${OS_RELEASE}" = "Ubuntu" ]; then
apt update
apt install -y sudo
apt install -y curl git \
build-essential \
autoconf \
automake \
libtool \
libffi-dev libreadline-dev libz-dev libsqlite-dev libssl-dev \
libreadline-dev libsqlite3-dev wget curl libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
elif [ "${OS_RELEASE}" = "CentOS Linux" ]; then
yum update -y
yum group install -y "Development Tools"
yum install -y libffi-devel readline-devel zlib-devel bzip2-devel sqlite-devel openssl-devel git
fi
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
export PATH="/root/.pyenv/bin:$PATH"
if [ -z "${PROMPT_COMMAND:-}" ]; then
export PROMPT_COMMAND=""
fi
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
grep -v '^ *#' < .python-version | while IFS= read -r line
do
pyenv install -s "${line}"
done
pip install tox