diff options
Diffstat (limited to 'ero1/setup.sh')
| -rwxr-xr-x | ero1/setup.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/ero1/setup.sh b/ero1/setup.sh new file mode 100755 index 0000000..1a5a29e --- /dev/null +++ b/ero1/setup.sh @@ -0,0 +1,36 @@ +echo "Setting up venv" + +python3 -m venv venv # 1>/dev/null 2>/dev/null + +res_code=$? + +if [ $res_code -ne 0 ]; +then + echo "Please make sure python3 is installed on your machine and that you have the right to create a venv here" + return; +fi + +echo "activating the venv" + +. venv/bin/activate # 1>/dev/null 2>/dev/null + +res_code=$? + +if [ $res_code -ne 0 ]; +then + echo "could not activate the venv, please check that $PWD/venv/bin/activate exists and that you have the right to source it" + return; +fi + +echo "adding the necessary packages to the venv" + +pip install -r requirements.txt + +if [ $res_code -ne 0 ]; +then + echo "could not download all requirements in the file $PWD/requirements.txt" + return; +fi + +echo "venv correctly setup at $PWD" + |
