~jocave/checkbox/hybrid-amd-gpu-mods

« back to all changes in this revision

Viewing changes to support/mk-venv

  • Committer: Zygmunt Krynicki
  • Date: 2015-03-07 09:18:41 UTC
  • mto: This revision was merged to the branch mainline in revision 3606.
  • Revision ID: zygmunt.krynicki@canonical.com-20150307091841-bo2chzx03282ngk2
support: ensure that CHECKBOX_VENV_PATH is absolute

This patch fixes CHECKBOX_VENV_PATH to always be an absolute directory
path. In the past there were cases where it could be set to a relative
directory name and then setting up PROVIDERPATH and developing all of
the providers would subsequently fail silently.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
    fi
60
60
fi
61
61
 
 
62
# Ensure that CHECKBOX_VENV_PATH is an absolute path
 
63
if ! echo "$CHECKBOX_VENV_PATH" | grep -q '^/'; then
 
64
    CHECKBOX_VENV_PATH="$(pwd)/$CHECKBOX_VENV_PATH"
 
65
fi
 
66
 
62
67
# Check if we can create a virtualenv
63
68
if [ ! -d $(dirname $CHECKBOX_VENV_PATH) ]; then
64
69
    echo "E: This script requires $(dirname $CHECKBOX_VENV_PATH) directory to exist"