From caeca594bf3be34fc36493d5f5ff7c7c2499d71a Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Thu, 4 Aug 2016 13:30:47 -0500 Subject: [PATCH] use mktemp when creating the venv directory Signed-off-by: Andrew Schoen --- scripts/build_utils.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index 4521c369..5f1a67aa 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -2,7 +2,8 @@ set -ex -VENV="/tmp/jenkins-venv/bin" +TEMPVENV=$(mktemp -td venv.XXXXXXXXXX) +VENV="$TEMPVENV/bin" install_python_packages () { # Use this function to create a virtualenv and install @@ -14,8 +15,7 @@ install_python_packages () { # install_python_packages "to_install[@]" # Create the virtualenv - rm -rf "/tmp/jenkins-venv" - virtualenv /tmp/jenkins-venv + virtualenv $TEMPVENV # Define and ensure the PIP cache PIP_SDIST_INDEX="$HOME/.cache/pip" -- 2.39.5