create_virutalenv.sh now takes the destination venv path as $1

Bug: T183145
Change-Id: I7ef60622b88b83dae28b1a572b59afbd561527cf
diff --git a/build_wheels.sh b/build_wheels.sh
index 6e5c6b5..0de8ae1 100755
--- a/build_wheels.sh
+++ b/build_wheels.sh
@@ -27,7 +27,7 @@
 
 
 # Build in a virtualenv, but install wheel files to $wheels_dir.
-build_venv=/tmp/${name}-build-venv
+build_venv=/tmp/jupyterhub-build-venv
 test -e $build_venv && rm -rf $build_venv
 virtualenv --python python3 --system-site-packages $build_venv
 $build_venv/bin/pip wheel -w $wheels_dir -r $base_dir/frozen-requirements.txt
diff --git a/create_virtualenv.sh b/create_virtualenv.sh
index 111ba8d..b8cfbb1 100755
--- a/create_virtualenv.sh
+++ b/create_virtualenv.sh
@@ -5,6 +5,9 @@
 # source common variables
 source $(dirname "${BASH_SOURCE[0]}")/profile.sh
 
+# $1 is venv path, else default to ../venv
+venv=${1:-$(realpath ${base_dir}/../jupyterhub-venv)}
+
 # remove any existing virtualenv
 test -e $venv && echo "Deleting existent virtualenv at $venv" && rm -rf $venv
 mkdir -pv $venv
@@ -14,4 +17,4 @@
 $venv/bin/pip install --no-index --find-links $wheels_dir --requirement $base_dir/frozen-requirements.txt
 
 # add a symlink to configurable-http-proxy so jupyterhub can start it
-ln -sf $artifacts_dir/node_modules/configurable-http-proxy/bin/configurable-http-proxy $venv/bin/configurable-http-proxy
\ No newline at end of file
+ln -sf $artifacts_dir/node_modules/configurable-http-proxy/bin/configurable-http-proxy $venv/bin/configurable-http-proxy
diff --git a/profile.sh b/profile.sh
index f950269..37adc9e 100644
--- a/profile.sh
+++ b/profile.sh
@@ -1,17 +1,7 @@
 #!/bin/bash
 
 # Common variables for build and deploy scripts.
-name=swap
-
 base_dir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
 dist=$(lsb_release --codename --short)
 artifacts_dir=$base_dir/artifacts/$dist
 wheels_dir=$artifacts_dir/wheels
-
-# Default deploy directory, should exist in production.
-if [ -e /srv/deployment/analytics/$name ]; then
-    venv=/srv/deployment/analytics/$name/venv
-# Else just use ../$name-venv for testing.
-else
-    venv=$(realpath ${base_dir}/../${name}-venv)
-fi
  NODES
3d 1