trove-dashboard/tools/with_venv.sh
zhengwei6082 49f316e4d6 Fix to use . to source script files
Adhering to coding conventions. Refer to ``Code conventions`` at
https://docs.openstack.org/contributor-guide/ for details.

Change-Id: Idb5916cd2ced8b3b20455b903b6056ea3034b191
2017-08-29 09:30:42 +08:00

8 lines
213 B
Bash
Executable File

#!/bin/bash
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}}
. ${VENV}/bin/activate && "$@"