From 23e3475c91a0655d3cda84bf306e95a66a506550 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 29 Sep 2024 20:49:09 +0200 Subject: [PATCH] venvs/relate --- re.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/re.sh b/re.sh index 9308616..c3536e3 100755 --- a/re.sh +++ b/re.sh @@ -142,6 +142,12 @@ venvs() { list_venv "${venv}" 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 done @@ -162,6 +168,7 @@ venvs create deactivate venvs init +venvs relate venvs link venvs install venvs list