Skip requirements.txt question if there is no file.
This commit is contained in:
parent
6c311b6225
commit
0723bd2927
1 changed files with 7 additions and 6 deletions
11
bin/venv-new
11
bin/venv-new
|
|
@ -85,10 +85,11 @@ $version -m venv venv $additional_parameters
|
||||||
source ./venv/bin/activate
|
source ./venv/bin/activate
|
||||||
echo "Finished!\n"
|
echo "Finished!\n"
|
||||||
|
|
||||||
|
if [ -e requirements.txt ]; then
|
||||||
echo "Install packages from requirements.txt? (y/n, default=y)"
|
echo "Install packages from requirements.txt? (y/n, default=y)"
|
||||||
read -r install_requirements_txt
|
read -r install_requirements_txt
|
||||||
install_requirements_txt=${install_requirements_txt:-y}
|
install_requirements_txt=${install_requirements_txt:-y}
|
||||||
if echo "$install_requirements_txt" | grep -qi '^[yj]$'; then
|
if echo "$install_requirements_txt" | grep -qi '^[yj]$'; then
|
||||||
python3 -m pip install -r requirements.txt
|
python3 -m pip install -r requirements.txt
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue