minor updates to init.sh script
This commit is contained in:
parent
c134b24a0a
commit
33a36c7a7a
1 changed files with 6 additions and 2 deletions
8
init.sh
8
init.sh
|
|
@ -71,8 +71,12 @@ else
|
||||||
export pip=$(which pip3)
|
export pip=$(which pip3)
|
||||||
if [ "$pip" = "" ]; then
|
if [ "$pip" = "" ]; then
|
||||||
export pip=$(which pip)
|
export pip=$(which pip)
|
||||||
|
if [ "$pip" = "" ]; then
|
||||||
|
echo "pip not found in PATH -- please install Python 3" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
echo "using pip: $pip $(pip --version)"
|
echo "using $("$pip" --version)"
|
||||||
if [ "$pip" = "" ]; then
|
if [ "$pip" = "" ]; then
|
||||||
echo "Pip for Python 3 not found (tried pip and pip3 in PATH)" >&2
|
echo "Pip for Python 3 not found (tried pip and pip3 in PATH)" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -96,9 +100,9 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d "$VENV_DIR/bin" ]]; then
|
if [[ ! -d "$VENV_DIR/bin" ]]; then
|
||||||
|
require_virtualenv
|
||||||
echo "Setting up virtualenv in '$VENV_DIR'"
|
echo "Setting up virtualenv in '$VENV_DIR'"
|
||||||
rm -f "$VENV_DIR/lib/python"
|
rm -f "$VENV_DIR/lib/python"
|
||||||
require_virtualenv
|
|
||||||
$virtualenv "$VENV_DIR"
|
$virtualenv "$VENV_DIR"
|
||||||
elif [[ ! -z $VIRTUAL_ENV ]] && [[ "$VIRTUAL_ENV" != "$VENV_DIR_ABS" ]]; then
|
elif [[ ! -z $VIRTUAL_ENV ]] && [[ "$VIRTUAL_ENV" != "$VENV_DIR_ABS" ]]; then
|
||||||
echo "Looks like the repository has moved location -- updating virtualenv"
|
echo "Looks like the repository has moved location -- updating virtualenv"
|
||||||
|
|
|
||||||
Reference in a new issue