Skip to content

Commit

Permalink
Update installdeps
Browse files Browse the repository at this point in the history
  • Loading branch information
cmlccie committed Jul 24, 2019
1 parent 38eb97c commit 6aea656
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions script/installdeps
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ export PIP_REQUIRE_VIRTUALENV=true


# Prefer use of a Pipfile and pipenv for dependency management
if [ -f "Pipfile" ] && [ -n "$(pipenv --version 2>/dev/null)" ]; then
if [[ -f "Pipfile" ]] && [[ -n "$(pipenv --version 2>/dev/null)" ]]; then
echo "==> Installing Pipfile dependencies"
pipenv install --dev --skip-lock

elif [ -f "requirements.txt" ]; then
elif [[ -f "requirements.txt" ]]; then
echo "==> Installing requirements.txt dependencies"

# Check for an active virtual environment, or look for one in the project directory
if [ -n "$(python -c 'import sys; print (sys.real_prefix)' 2>/dev/null)" ]; then
if [[ -n "$(python -c 'import sys; print (sys.real_prefix)' 2>/dev/null)" ]]; then
echo "Installing packages in the active virtual environment"
elif [ -f "venv/bin/activate" ]; then
elif [[ -f "venv/bin/activate" ]]; then
echo "Installing packages in the project's venv virtual environment"
source venv/bin/activate
elif [ -f ".venv/bin/activate" ]; then
elif [[ -f ".venv/bin/activate" ]]; then
echo "Installing packages in the project's .venv virtual environment"
source .venv/bin/activate
else
Expand Down

0 comments on commit 6aea656

Please sign in to comment.