-
Notifications
You must be signed in to change notification settings - Fork 15
/
install.sh
executable file
·64 lines (52 loc) · 1.12 KB
/
install.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
60
61
62
63
64
#!/usr/bin/env bash
deactivate;
ACTIVATE_FILE='venv/bin/activate';
if [ -f "$ACTIVATE_FILE" ];
then
echo
echo "Virtual Environment found. Attempting to activate it."
echo
. venv/bin/activate;
else
echo
echo "Virtual Environment not found. Attempting to create it"
echo
python -m venv venv
echo
echo "Activating Virtual Environment"
echo
. venv/bin/activate;
fi
ACTIVATED=$?;
if [ $ACTIVATED != 0 ]; then
echo
echo "Could not activate a python virtual environment" >&2;
echo
exit $ACTIVATED;
fi
echo
echo "Attempting to install DMOD requirements"
echo
pip install -r requirements.txt
REQUIREMENTS_INSTALLED=$?
if [ $REQUIREMENTS_INSTALLED != 0 ]; then
echo
echo "DMOD Requirements could not be installed." >&2
echo
exit $REQUIREMENTS_INSTALLED
fi
echo
echo "Attempting to update DMOD packages..."
echo
./scripts/update_package.sh
PACKAGES_UPDATED=$?;
if [ $PACKAGES_UPDATED != 0 ]; then
echo
echo "DMOD Packages could not be updated." >&2;
echo
else
echo
echo "DMOD has been installed and is ready to go"
echo
fi
exit $PACKAGES_UPDATED