forked from jedie/django-for-runners
-
Notifications
You must be signed in to change notification settings - Fork 0
/
boot_django_for_runners.sh
executable file
·59 lines (49 loc) · 1.33 KB
/
boot_django_for_runners.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
#!/usr/bin/env bash
"""
Django-ForRunners boot script
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information in the README:
https://github.com/jedie/django-for-runners#readme
created 03.09.2018 by Jens Diemer <[email protected]>
:copyleft: 2018 by the django-for-runners team, see AUTHORS for more details.
:license: GNU GPL v3 or above, see LICENSE for more details.
"""
DESTINATION=~/Django-ForRunners
REPOSITORY="git+https://github.com/jedie/django-for-runners.git"
BRANCH="master"
EGG="django-for-runners"
(
set -e
set -x
python3 --version
python3 -Im venv --without-pip ${DESTINATION}
)
(
source ${DESTINATION}/bin/activate
set -x
python3 -m ensurepip
)
if [ "$?" == "0" ]; then
echo "pip installed, ok"
else
echo "ensurepip doesn't exist, use get-pip.py"
(
set -e
source ${DESTINATION}/bin/activate
set -x
cd ${DESTINATION}/bin
wget https://bootstrap.pypa.io/get-pip.py
${DESTINATION}/bin/python get-pip.py
)
fi
(
set -e
source ${DESTINATION}/bin/activate
set -x
cd ${DESTINATION}/bin/
pip3 install --upgrade pip
pip3 install -e ${REPOSITORY}@${BRANCH}#egg=${EGG}
pip3 install -r ${DESTINATION}/src/django-for-runners/requirements.txt
cd ${DESTINATION}/bin/
./for_runners --version
)