-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdev-install.sh
More file actions
executable file
·37 lines (31 loc) · 882 Bytes
/
dev-install.sh
File metadata and controls
executable file
·37 lines (31 loc) · 882 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
#!/bin/env bash
set -e
if [ -z "$VIRTUAL_ENV" ]; then
read -p "You are not currently using a virtual environment. Do you want to proceed? " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi
set +e
PYTHON=$(which ${PYTHON:-python})
set -e
if [ -z "$PYTHON" ]; then
echo "Python interpreter not found. Exiting."
exit 1
fi
echo "Installing all armory-suite components using $PYTHON"
set -x
$PYTHON -m pip install --upgrade pip
$PYTHON -m pip install --editable .
$PYTHON -m pip install --editable library
$PYTHON -m pip install --editable matrix
$PYTHON -m pip install --editable examples[all]
set +x
LOCAL_REPO=$(git rev-parse --show-toplevel)
read -p "Do you want to install the pre-commit hook into the local git repository ($LOCAL_REPO)? " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
set -x
$PYTHON -m pre_commit install
fi