venvs/relate

This commit is contained in:
Marc Beninca 2024-09-29 20:49:09 +02:00
parent 8e69d784fc
commit 23e3475c91
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

7
re.sh
View file

@ -142,6 +142,12 @@ venvs() {
list_venv "${venv}" list_venv "${venv}"
deactivate deactivate
;; ;;
"relate")
absolute="$(readlink -f "${venv}/bin/python")"
prevenv="$(readlink -f "${venv}")"
relative=$(echo "${absolute}" | sed "s|${prevenv}|..|")
echo ln --force --symbolic "${relative}" "${venv}/bin/python"
;;
*) ;; *) ;;
esac esac
done done
@ -162,6 +168,7 @@ venvs create
deactivate deactivate
venvs init venvs init
venvs relate
venvs link venvs link
venvs install venvs install
venvs list venvs list