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
13
bin/venv-new
13
bin/venv-new
|
|
@ -85,10 +85,11 @@ $version -m venv venv $additional_parameters
|
|||
source ./venv/bin/activate
|
||||
echo "Finished!\n"
|
||||
|
||||
|
||||
echo "Install packages from requirements.txt? (y/n, default=y)"
|
||||
read -r install_requirements_txt
|
||||
install_requirements_txt=${install_requirements_txt:-y}
|
||||
if echo "$install_requirements_txt" | grep -qi '^[yj]$'; then
|
||||
python3 -m pip install -r requirements.txt
|
||||
if [ -e requirements.txt ]; then
|
||||
echo "Install packages from requirements.txt? (y/n, default=y)"
|
||||
read -r install_requirements_txt
|
||||
install_requirements_txt=${install_requirements_txt:-y}
|
||||
if echo "$install_requirements_txt" | grep -qi '^[yj]$'; then
|
||||
python3 -m pip install -r requirements.txt
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue