]> git.mar77i.info Git - hublib/blobdiff - setup_venv.sh
big cleanup and refactoring #1
[hublib] / setup_venv.sh
index 139fde9a7cc2830eb658a7050ad4f0213dea156a..894aad539ad92c9da9377d873fab5cb6046cec8d 100644 (file)
@@ -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"