freezer-web-ui/tools/with_venv.sh
chao liu e9e2a3769c use . instead of source.
Code conventions: Use “.” to source script files
When you have to source a script file, for example ,
a credentials file to gain access to user-only or
 admin-only CLI commands, use . instead of source.
See more:
http://docs.openstack.org/contributor-guide/writing-style/code-conventions

Change-Id: If2ef1f3f56008f7e9e1bec13b94d542a3b9667e7
2018-01-29 14:25:56 +00: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 && "$@"