From 33dfc1367286c92f90a1a484bcd3ba58d02f556e Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 23 Aug 2024 16:13:32 +0200 Subject: [PATCH] spcd_dl --- spcd.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/spcd.sh b/spcd.sh index f7aec42..ac7cf4c 100644 --- a/spcd.sh +++ b/spcd.sh @@ -514,10 +514,12 @@ ${SPCD_PYTHON_VENV}/lib/${SPCD_PYTHON_COMMAND}/site-packages" spcd_split spcd_echo "SPCD_PYTHON_PACKAGES" "SPCD_PYTHON_VENV_PACKAGES" # variables + # certificate authorities [ -n "${SPCD_CA_1}" ] && SPCD_CA=true - # + # downloads + SPCD_DL="$(mktemp --directory)" spcd_split - spcd_echo "SPCD_CA" + spcd_echo "SPCD_CA" "SPCD_DL" } spcd_list_working_directory() { @@ -711,9 +713,7 @@ index-url = ${SPCD_URL_PYTHON} spcd_install_python_modules() { spcd_step "Install Python modules" - spcd_ipm__root="$(mktemp --directory)" || exit spcd_ipm__target="${SPCD_PYTHON_VENV_PACKAGES}" - echo "→ ${spcd_ipm__root}" for spcd_ipm__repository in "${SPCD_GIT_MAIN}" "${SPCD_GIT_ROOT}"; do spcd_ipm__url="$(spcd_get_git_url "${spcd_ipm__repository}")" spcd_ipm__name="$(basename "${spcd_ipm__url}")" @@ -723,9 +723,9 @@ ${spcd_ipm__url} ↓" git clone \ "${spcd_ipm__url}" \ - "${spcd_ipm__root}/${spcd_ipm__name}" || + "${SPCD_DL}/${spcd_ipm__name}" || exit - spcd_ipm__path="${spcd_ipm__root}/${spcd_ipm__name}/${spcd_ipm__name}" + spcd_ipm__path="${SPCD_DL}/${spcd_ipm__name}/${spcd_ipm__name}" echo "\ ${spcd_ipm__path} ↓ @@ -733,10 +733,10 @@ ${spcd_ipm__target}" cp --recursive "${spcd_ipm__path}" "${spcd_ipm__target}" || exit # check matching of file and variable - spcd_ipm__script="${spcd_ipm__root}/${spcd_ipm__name}/spcd.sh" + spcd_ipm__script="${SPCD_DL}/${spcd_ipm__name}/spcd.sh" if [ -f "${spcd_ipm__script}" ]; then spcd_split - spcd_ipm__check="${spcd_ipm__root}/check.${SPCD_CMD_SUM}" + spcd_ipm__check="${SPCD_DL}/check.${SPCD_CMD_SUM}" "${SPCD_CMD_SUM}" "${spcd_ipm__script}" >"${spcd_ipm__check}" printf "%s" "${SPCD}" >"${spcd_ipm__script}" ls -l "${spcd_ipm__script}" @@ -747,8 +747,6 @@ ${spcd_ipm__target}" done spcd_split spcd_ls "${spcd_ipm__target}" - spcd_split - spcd_rm "${spcd_ipm__root}" } spcd_install_packages() {