diff options
author | ZhiQiang Fan <aji.zqfan@gmail.com> | 2013-09-08 16:14:40 +0800 |
---|---|---|
committer | ZhiQiang Fan <aji.zqfan@gmail.com> | 2013-09-20 05:46:45 +0800 |
commit | 27d0463e93fbe9d1192d3db6a0b9bce3b13efd9a (patch) | |
tree | 45864a73a29b4ff51a695d13bda3fae73a1afaca /tools | |
parent | 5a5023bea0fad8e0c1461fe5763d3befc5bde514 (diff) | |
download | keystone-27d0463e93fbe9d1192d3db6a0b9bce3b13efd9a.tar.gz |
Enclose command args in with_venv.sh
Sync tools/with_venv.sh from oslo, it will support argument with
blanks.
Closes-Bug: #1220937
Change-Id: Id10528efcdd1abad3009c13f2c5bde6dcf172520
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/with_venv.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/with_venv.sh b/tools/with_venv.sh index c8d2940fc..7303990bd 100755 --- a/tools/with_venv.sh +++ b/tools/with_venv.sh @@ -1,4 +1,7 @@ #!/bin/bash -TOOLS=`dirname $0` -VENV=$TOOLS/../.venv -source $VENV/bin/activate && $@ +TOOLS_PATH=${TOOLS_PATH:-$(dirname $0)} +VENV_PATH=${VENV_PATH:-${TOOLS_PATH}} +VENV_DIR=${VENV_NAME:-/../.venv} +TOOLS=${TOOLS_PATH} +VENV=${VENV:-${VENV_PATH}/${VENV_DIR}} +source ${VENV}/bin/activate && "$@" |