Memerr/make_venv.sh

18 lines
335 B
Bash
Raw Permalink Normal View History

2022-10-28 18:21:47 +00:00
#!/bin/bash
2022-11-05 01:45:06 +00:00
if [ ! -d "./venv" ]; then
mkdir ./venv 2> /dev/null
python -m venv ./venv
fi
2022-10-28 18:21:47 +00:00
cp ./src/* ./venv/
cp ./src/.env ./venv/.env 2> /dev/null
cd ./venv
2022-11-05 01:45:06 +00:00
pip install -r requirements.txt --user
2022-10-28 18:21:47 +00:00
touch .env
2022-11-05 01:45:06 +00:00
echo "evn $(cat .env | xargs) python ./main.py" >> run.sh
chmod +x run.sh
2022-10-28 18:21:47 +00:00
env $(cat .env | xargs) python ./main.py