blob: b7e71c937937a40d48f549475bb2a1bdaafe4b77 (
plain)
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
|
#!/bin/sh
# Get relative path of the root directory of the project
rdir=`git rev-parse --git-dir`
rel_path="$(dirname "$rdir")"
# Change to that path and run the file
cd $rel_path
echo "creating venv..."
if test -d .env
then echo "venv exists"
else python3 -m venv .env && echo "venv created"
fi
echo ''
# Activate virtual environment
echo "activating venv..."
if test -f .env/bin/activate
then source .env/bin/activate && echo "venv activate (bin)"
elif test -f .env/Scripts/activate
then source .env/Scripts/activate && echo "venv activated (Scripts)"
else exit 1
fi
echo ''
echo "installing requirements..."
if pip install -r dev-requirements.txt
then echo "requirements installed"
else exit 1
fi
echo ''
echo "compiling parser..."
sh scripts/compile.sh
echo "parser compiled"
echo ''
echo "setup git hooks..."
sh scripts/setup-hooks.sh
echo "git hooks setup"
exit 0
|