Allow user to override pip cache location

Building a VM containing devstack is faster if you can save
the cache files for pip in a location that is not deleted
when the VM is rebuilt. This change allows the user to
set the PIP_DOWNLOAD_CACHE in their localrc file to point
to any directory writable by root, including a directory
mounted from the host containing the VM.

Change-Id: I27179c1c212140d6734f6725f498be52fd18e9ed
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
diff --git a/functions b/functions
index 8cf7c74..c53d3d7 100644
--- a/functions
+++ b/functions
@@ -387,7 +387,7 @@
     else
         CMD_PIP=/usr/bin/pip-python
     fi
-    sudo PIP_DOWNLOAD_CACHE=/var/cache/pip \
+    sudo PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \
         HTTP_PROXY=$http_proxy \
         HTTPS_PROXY=$https_proxy \
         $CMD_PIP install --use-mirrors $@