From c776b237b9dd3f1bd5252d1d585a6d73d91c35f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sim=C3=B3n=20Castillo?= Date: Fri, 29 Apr 2016 22:01:32 -0430 Subject: [PATCH] Fix bad absolute paths --- .../utility/install_python_dependencies.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/utility/install_python_dependencies.sh b/{{cookiecutter.project_slug}}/utility/install_python_dependencies.sh index 89bb80658..d23fcf9e9 100755 --- a/{{cookiecutter.project_slug}}/utility/install_python_dependencies.sh +++ b/{{cookiecutter.project_slug}}/utility/install_python_dependencies.sh @@ -1,5 +1,8 @@ #!/bin/bash +WORK_DIR="$(dirname "$0")" +PROJECT_DIR="$(dirname "$WORK_DIR")" + pip --version >/dev/null 2>&1 || { echo >&2 -e "\npip is required but it's not installed." echo >&2 -e "You can install it by running the following command:\n" @@ -43,10 +46,10 @@ if [ -z "$VIRTUAL_ENV" ]; then exit 1; else - pip install -r requirements/local.txt - pip install -r requirements/test.txt + pip install -r $PROJECT_DIR/requirements/local.txt + pip install -r $PROJECT_DIR/requirements/test.txt {% if cookiecutter.use_heroku == "y" -%} - pip install -r requirements.txt + pip install -r $PROJECT_DIR/requirements.txt {%- endif %} fi