X-Git-Url: https://git.mar77i.info/?a=blobdiff_plain;f=setup_venv.sh;h=894aad539ad92c9da9377d873fab5cb6046cec8d;hb=3c5ec422ace644d848d2f845b0f3ef8de73462ef;hp=139fde9a7cc2830eb658a7050ad4f0213dea156a;hpb=16c0b1e580f2c92baf6882ec4dfa655c267d23b9;p=hublib diff --git a/setup_venv.sh b/setup_venv.sh index 139fde9..894aad5 100644 --- a/setup_venv.sh +++ b/setup_venv.sh @@ -1,8 +1,8 @@ venv_dir="${VIRTUAL_ENV:-venv}" -if type deactivate &>/dev/null; then +if type -f deactivate &>/dev/null; then deactivate fi -if [[ ! -d "${venv_dir}" ]]; then +if [[ ! -e "${venv_dir}" ]]; then "${PYTHON:-python}" -m venv "${venv_dir}" fi source "${venv_dir}/bin/activate"