summaryrefslogtreecommitdiff
path: root/init.sh
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@figma.com>2019-01-15 23:26:59 +0300
committerRasmus Andersson <rasmus@figma.com>2019-01-15 23:26:59 +0300
commit33a36c7a7aec7ee5062e3e26c7e047cf05297b22 (patch)
treeda3d21e91429c9d7685dc14167863c12164de7a8 /init.sh
parentc134b24a0a80588cf1a05dc0ec21be029599fd11 (diff)
downloadinter-33a36c7a7aec7ee5062e3e26c7e047cf05297b22.tar.xz
minor updates to init.sh script
Diffstat (limited to 'init.sh')
-rwxr-xr-xinit.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/init.sh b/init.sh
index aec63a02d..145732138 100755
--- a/init.sh
+++ b/init.sh
@@ -71,8 +71,12 @@ else
export pip=$(which pip3)
if [ "$pip" = "" ]; then
export pip=$(which pip)
+ if [ "$pip" = "" ]; then
+ echo "pip not found in PATH -- please install Python 3" >&2
+ exit 1
+ fi
fi
- echo "using pip: $pip $(pip --version)"
+ echo "using $("$pip" --version)"
if [ "$pip" = "" ]; then
echo "Pip for Python 3 not found (tried pip and pip3 in PATH)" >&2
exit 1
@@ -96,9 +100,9 @@ else
fi
if [[ ! -d "$VENV_DIR/bin" ]]; then
+ require_virtualenv
echo "Setting up virtualenv in '$VENV_DIR'"
rm -f "$VENV_DIR/lib/python"
- require_virtualenv
$virtualenv "$VENV_DIR"
elif [[ ! -z $VIRTUAL_ENV ]] && [[ "$VIRTUAL_ENV" != "$VENV_DIR_ABS" ]]; then
echo "Looks like the repository has moved location -- updating virtualenv"