forked from otto-de/gatekeeper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·43 lines (37 loc) · 920 Bytes
/
setup.sh
File metadata and controls
executable file
·43 lines (37 loc) · 920 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
43
#!/usr/bin/env bash
set -e
DOCS_DEPENDENCIES=false
usage() { echo "Usage: $0 [--doc-deps]" 1>&2;
echo "Options:"
echo " --doc-deps Includes dependencies to generate docs (ie. Sphinx)."
exit 1; }
while getopts "h-:" OPT; do
case ${OPT} in
-)
case ${OPTARG} in
doc-deps)
DOCS_DEPENDENCIES=true
;;
*)
echo "Invalid option: ${OPTARG}" >&2
usage
;;
esac
;;
h)
usage
;;
*)
echo "Invalid option: -${OPTARG}" >&2
usage
;;
esac
done
echo -e "\x1b[1mPreparing VirtualEnv\x1b[0m"
pip install --user virtualenv
python -m virtualenv -p python3 venv
./venv/bin/pip3 install -r requirements.txt
if [ "${DOCS_DEPENDENCIES}" == "true" ]; then
echo -e "\x1b[1mInstalling dependencies for docs\x1b[0m"
./venv/bin/pip3 install -r docs/requirements.txt
fi