Use base venv
This commit is contained in:
parent
c3a0bf3865
commit
d949b1c118
1 changed files with 2 additions and 1 deletions
|
|
@ -6,10 +6,11 @@ this_dir="$( cd "$( dirname "$0" )" && pwd )"
|
||||||
|
|
||||||
# Kebab to snake case
|
# Kebab to snake case
|
||||||
module_name="$(basename "${this_dir}" | sed -e 's/-/_/g')"
|
module_name="$(basename "${this_dir}" | sed -e 's/-/_/g')"
|
||||||
|
base_dir="$(realpath "${this_dir}/..")"
|
||||||
src_dir="${this_dir}/${module_name}"
|
src_dir="${this_dir}/${module_name}"
|
||||||
|
|
||||||
# Path to virtual environment
|
# Path to virtual environment
|
||||||
: "${venv:=${this_dir}/.venv}"
|
: "${venv:=${base_dir}/.venv}"
|
||||||
|
|
||||||
if [ -d "${venv}" ]; then
|
if [ -d "${venv}" ]; then
|
||||||
# Activate virtual environment if available
|
# Activate virtual environment if available
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue