Skip to content

Commit

Permalink
Enclose command args in with_venv.sh
Browse files Browse the repository at this point in the history
Sync tools/with_venv.sh from oslo, it will support argument with
blanks.

Change-Id: Ibb802b21d609ea6b54fc168b17705f06ad1cb86a
Closes-Bug: #1220937
  • Loading branch information
zqfan committed Sep 19, 2013
1 parent 26a47e7 commit dab794e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions 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 && "$@"

0 comments on commit dab794e

Please sign in to comment.