-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-venvs.bash
executable file
·72 lines (59 loc) · 2.78 KB
/
setup-venvs.bash
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
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
set -euE -o pipefail
if [ "$TERM" = dumb ]; then
yellow=''
ansi_reset=''
else
yellow=`echo -e '\e[33m'`
ansi_reset=`echo -e '\e[m'`
fi
if [ "`whoami`" = root ]; then
echo "${yellow}Don't run this script as root.${ansi_reset}"
exit 1
fi
PYTHON_VERSION=3.8.0
if [ ! -d ~/.pyenv/versions/"$PYTHON_VERSION" ]; then
pyenv install "$PYTHON_VERSION"
pyenv global "$PYTHON_VERSION"
fi
if [ ! -d ~/tools/python/"$PYTHON_VERSION"/aws ]; then
~/.pyenv/versions/"$PYTHON_VERSION/bin/python3" -m venv ~/tools/python/"$PYTHON_VERSION"/aws
~/tools/python/"$PYTHON_VERSION"/aws/bin/pip3 install -U pip
~/tools/python/"$PYTHON_VERSION"/aws/bin/pip3 install awscli
fi
if [ ! -d ~/tools/python/"$PYTHON_VERSION"/http ]; then
~/.pyenv/versions/"$PYTHON_VERSION/bin/python3" -m venv ~/tools/python/"$PYTHON_VERSION"/http
~/tools/python/"$PYTHON_VERSION"/http/bin/pip3 install -U pip
~/tools/python/"$PYTHON_VERSION"/http/bin/pip3 install httpie
fi
if [ ! -d ~/tools/python/"$PYTHON_VERSION"/oj ]; then
~/.pyenv/versions/"$PYTHON_VERSION/bin/python3" -m venv ~/tools/python/"$PYTHON_VERSION"/oj
~/tools/python/"$PYTHON_VERSION"/oj/bin/pip3 install -U pip
~/tools/python/"$PYTHON_VERSION"/oj/bin/pip3 install online-judge-tools
fi
if [ ! -d ~/tools/python/"$PYTHON_VERSION"/pipenv ]; then
~/.pyenv/versions/"$PYTHON_VERSION"/bin/python3 -m venv ~/tools/python/"$PYTHON_VERSION"/pipenv
~/tools/python/"$PYTHON_VERSION"/pipenv/bin/pip3 install -U pip
~/tools/python/"$PYTHON_VERSION"/pipenv/bin/pip3 install pipenv
fi
if [ ! -d ~/tools/python/"$PYTHON_VERSION"/ptpython ]; then
~/.pyenv/versions/"$PYTHON_VERSION/bin/python3" -m venv ~/tools/python/"$PYTHON_VERSION"/ptpython
~/tools/python/"$PYTHON_VERSION"/ptpython/bin/pip3 install -U pip
~/tools/python/"$PYTHON_VERSION"/ptpython/bin/pip3 install ptpython
fi
if [ ! -d ~/tools/python/"$PYTHON_VERSION"/pygmentize ]; then
~/.pyenv/versions/"$PYTHON_VERSION/bin/python3" -m venv ~/tools/python/"$PYTHON_VERSION"/pygmentize
~/tools/python/"$PYTHON_VERSION"/pygmentize/bin/pip3 install -U pip
~/tools/python/"$PYTHON_VERSION"/pygmentize/bin/pip3 install tw2.pygmentize
fi
if [ ! -d ~/tools/python/"$PYTHON_VERSION"/ranger ]; then
~/.pyenv/versions/"$PYTHON_VERSION/bin/python3" -m venv ~/tools/python/"$PYTHON_VERSION"/ranger
~/tools/python/"$PYTHON_VERSION"/ranger/bin/pip3 install -U pip
~/tools/python/"$PYTHON_VERSION"/ranger/bin/pip3 install ranger-fm
~/tools/python/"$PYTHON_VERSION"/ranger/bin/ranger --copy-config=all
fi
if [ ! -d ~/tools/python/"$PYTHON_VERSION"/remarshal ]; then
~/.pyenv/versions/"$PYTHON_VERSION/bin/python3" -m venv ~/tools/python/"$PYTHON_VERSION"/remarhsal
~/tools/python/"$PYTHON_VERSION"/remarhsal/bin/pip3 install -U pip
~/tools/python/"$PYTHON_VERSION"/remarhsal/bin/pip3 install remarshal
fi