-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·39 lines (31 loc) · 914 Bytes
/
install.sh
File metadata and controls
executable file
·39 lines (31 loc) · 914 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
#!/bin/sh
set -e
if [ ! "$(command -v shellcheck)" ]; then
echo "Shellcheck is missing, install it: https://github.com/koalaman/shellcheck#installing"
exit 1
fi
if [ ! "$(command -v python3)" ]; then
echo "Python 3 is missing, install it: https://www.python.org/downloads"
exit 1
fi
if [ ! "$(command -v pip)" ]; then
echo "Downloading and installing pip..."
curl -sSL https://bootstrap.pypa.io/get-pip.py | python
fi
if [ ! "$(command -v virtualenv)" ]; then
echo "Downloading and installing virtualenv..."
pip install virtualenv
fi
if [ ! -d .venv ]; then
echo "Creating Python-3 virtual environment..."
virtualenv -p python3 .venv
fi
echo "Entering Python-3 virtual environment..."
# shellcheck disable=SC1091
. .venv/bin/activate
if [ ! "$(command -v poetry)" ]; then
echo "Downloading and installing peotry..."
pip install poetry
fi
echo "Installing project..."
poetry install