forked from danwalkeruk/fortigate2csv
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprepare_dev.sh
More file actions
executable file
·29 lines (23 loc) · 866 Bytes
/
prepare_dev.sh
File metadata and controls
executable file
·29 lines (23 loc) · 866 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
#!/bin/sh
# Prepare the development environment
# This script is intended to be run on the development machine.
# It will install the required packages and set up the development environment.
# It uses the currently active virtual environment, existing .venv or
# creates a new one.
PYTHON=python3
venvdir=.venv
if test -z "$VIRTUAL_ENV" ; then
if test -d "$venvdir" ; then
# shellcheck source=/dev/null
. "$venvdir/bin/activate" || exit 1
else
echo "Creating new virtual environment $venvdir"
"$PYTHON" -m venv "$venvdir" || exit 1
# shellcheck source=/dev/null
. "$venvdir/bin/activate" || exit 1
"$PYTHON" -m pip install --upgrade pip
"$PYTHON" -m pip install --upgrade setuptools
fi
fi
"$PYTHON" -m pip install -r requirements_dev.txt
"$PYTHON" -m pip install -r requirements.txt