From f7de33f0e4d7d6064c5d5a6ad0b5a0a1632b7acc Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 29 Sep 2024 14:10:06 +0200 Subject: [PATCH] command,list_venv --- re.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/re.sh b/re.sh index d852276..8302999 100755 --- a/re.sh +++ b/re.sh @@ -15,13 +15,16 @@ activate() { pip --version } caches() { + local command="${1}" set \ ".cache/pip" \ ".cache/uv" \ ".local/share/pip" \ ".local/share/uv" + echo + echo "caches:" for cache in "${@}"; do - "${1}" "${HOME}/${cache}" + "${command}" "${HOME}/${cache}" done } deactivate() { @@ -33,7 +36,10 @@ deactivate() { } list() { echo - ls -a -l "${1}/bin" + ls -a -l "${1}/${2}" +} +list_venv() { + list "${1}" "bin" } pip_install() { echo @@ -98,10 +104,10 @@ os="${root}/os" remove "${os}" python3 -m "venv" "${os}" activate "${os}" -list "${os}" +list_venv "${os}" pip_install --upgrade "pip" pip_install "uv" -list "${os}" +list_venv "${os}" set \ "3.12" @@ -121,16 +127,16 @@ deactivate for version in "${@}"; do activate "${py}" - list "${py}" + list_venv "${py}" pip_install "uv" - list "${py}" + list_venv "${py}" uv_install for module in "rwx"; do ln --symbolic \ "/rwx/rwx/${module}" \ "${py}/lib/python${version}/site-packages/${module}" done - list "${py}" + list_venv "${py}" done -caches ls +caches list_venv