From 719aa2f9fd4d0ab3f8a5ac34a18a873864d00080 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 29 Sep 2024 18:08:39 +0200 Subject: [PATCH] indent --- py.pypi.sh | 84 +++++++++++++++++++++++++++--------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/py.pypi.sh b/py.pypi.sh index 561e16a..25a744c 100755 --- a/py.pypi.sh +++ b/py.pypi.sh @@ -46,49 +46,49 @@ for version in "3.12" "3.11" "3.10"; do export OLD_PATH="${PATH}" export PATH="${VIRTUAL_ENV}/bin:${PATH}" -python -m pip \ - download \ - --dest "${root}" \ - "${@}" + python -m pip \ + download \ + --dest "${root}" \ + "${@}" -prefix="Name: " -for wheel in "${root}/"*; do - rm --force --recursive "${tmp}" - echo - echo "${wheel}" - file="$(basename "${wheel}")" - case "${file}" in - *.tar.gz) - short="${file%.*}" - short="${short%.*}" - ;; - *.whl) - short="${file%.*}" - ;; - esac - file_name="$(echo "${short}" | cut -d "-" -f 1)" - file_version="$(echo "${short}" | cut -d "-" -f 2)" - case "${file}" in - *.tar.gz) - meta_data="${file_name}-${file_version}/${file_name}.egg-info/PKG-INFO" - tar xf "${wheel}" -C "${tmp}" "${meta_data}" - ;; - *.whl) - meta_data="${file_name}-${file_version}.dist-info/METADATA" - unzip "${wheel}" "${meta_data}" -d "${tmp}" - ;; - esac - name="$(grep "${prefix}" "${tmp}/${meta_data}" | sed "s|${prefix}||")" - echo "${name}" - name="$(echo "${name}" | tr "[:upper:]" "[:lower:]")" - name="$(echo "${name}" | tr "." "-")" - name="$(echo "${name}" | tr "_" "-")" - name="$(echo "${name}" | tr -d "\r")" - echo "${name}" - sub="${root}/simple/${name}" - mkdir --parents "${sub}" - mv -i "${root}/${file_name}-"* "${sub}/" -done + prefix="Name: " + for wheel in "${root}/"*; do + rm --force --recursive "${tmp}" + echo + echo "${wheel}" + file="$(basename "${wheel}")" + case "${file}" in + *.tar.gz) + short="${file%.*}" + short="${short%.*}" + ;; + *.whl) + short="${file%.*}" + ;; + esac + file_name="$(echo "${short}" | cut -d "-" -f 1)" + file_version="$(echo "${short}" | cut -d "-" -f 2)" + case "${file}" in + *.tar.gz) + meta_data="${file_name}-${file_version}/${file_name}.egg-info/PKG-INFO" + tar xf "${wheel}" -C "${tmp}" "${meta_data}" + ;; + *.whl) + meta_data="${file_name}-${file_version}.dist-info/METADATA" + unzip "${wheel}" "${meta_data}" -d "${tmp}" + ;; + esac + name="$(grep "${prefix}" "${tmp}/${meta_data}" | sed "s|${prefix}||")" + echo "${name}" + name="$(echo "${name}" | tr "[:upper:]" "[:lower:]")" + name="$(echo "${name}" | tr "." "-")" + name="$(echo "${name}" | tr "_" "-")" + name="$(echo "${name}" | tr -d "\r")" + echo "${name}" + sub="${root}/simple/${name}" + mkdir --parents "${sub}" + mv -i "${root}/${file_name}-"* "${sub}/" + done export PATH="${OLD_PATH}" unset OLD_PATH VIRTUAL_ENV