indent
This commit is contained in:
parent
37af0dbe2d
commit
719aa2f9fd
1 changed files with 42 additions and 42 deletions
84
py.pypi.sh
84
py.pypi.sh
|
@ -46,49 +46,49 @@ for version in "3.12" "3.11" "3.10"; do
|
||||||
export OLD_PATH="${PATH}"
|
export OLD_PATH="${PATH}"
|
||||||
export PATH="${VIRTUAL_ENV}/bin:${PATH}"
|
export PATH="${VIRTUAL_ENV}/bin:${PATH}"
|
||||||
|
|
||||||
python -m pip \
|
python -m pip \
|
||||||
download \
|
download \
|
||||||
--dest "${root}" \
|
--dest "${root}" \
|
||||||
"${@}"
|
"${@}"
|
||||||
|
|
||||||
prefix="Name: "
|
prefix="Name: "
|
||||||
for wheel in "${root}/"*; do
|
for wheel in "${root}/"*; do
|
||||||
rm --force --recursive "${tmp}"
|
rm --force --recursive "${tmp}"
|
||||||
echo
|
echo
|
||||||
echo "${wheel}"
|
echo "${wheel}"
|
||||||
file="$(basename "${wheel}")"
|
file="$(basename "${wheel}")"
|
||||||
case "${file}" in
|
case "${file}" in
|
||||||
*.tar.gz)
|
*.tar.gz)
|
||||||
short="${file%.*}"
|
short="${file%.*}"
|
||||||
short="${short%.*}"
|
short="${short%.*}"
|
||||||
;;
|
;;
|
||||||
*.whl)
|
*.whl)
|
||||||
short="${file%.*}"
|
short="${file%.*}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
file_name="$(echo "${short}" | cut -d "-" -f 1)"
|
file_name="$(echo "${short}" | cut -d "-" -f 1)"
|
||||||
file_version="$(echo "${short}" | cut -d "-" -f 2)"
|
file_version="$(echo "${short}" | cut -d "-" -f 2)"
|
||||||
case "${file}" in
|
case "${file}" in
|
||||||
*.tar.gz)
|
*.tar.gz)
|
||||||
meta_data="${file_name}-${file_version}/${file_name}.egg-info/PKG-INFO"
|
meta_data="${file_name}-${file_version}/${file_name}.egg-info/PKG-INFO"
|
||||||
tar xf "${wheel}" -C "${tmp}" "${meta_data}"
|
tar xf "${wheel}" -C "${tmp}" "${meta_data}"
|
||||||
;;
|
;;
|
||||||
*.whl)
|
*.whl)
|
||||||
meta_data="${file_name}-${file_version}.dist-info/METADATA"
|
meta_data="${file_name}-${file_version}.dist-info/METADATA"
|
||||||
unzip "${wheel}" "${meta_data}" -d "${tmp}"
|
unzip "${wheel}" "${meta_data}" -d "${tmp}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
name="$(grep "${prefix}" "${tmp}/${meta_data}" | sed "s|${prefix}||")"
|
name="$(grep "${prefix}" "${tmp}/${meta_data}" | sed "s|${prefix}||")"
|
||||||
echo "${name}"
|
echo "${name}"
|
||||||
name="$(echo "${name}" | tr "[:upper:]" "[:lower:]")"
|
name="$(echo "${name}" | tr "[:upper:]" "[:lower:]")"
|
||||||
name="$(echo "${name}" | tr "." "-")"
|
name="$(echo "${name}" | tr "." "-")"
|
||||||
name="$(echo "${name}" | tr "_" "-")"
|
name="$(echo "${name}" | tr "_" "-")"
|
||||||
name="$(echo "${name}" | tr -d "\r")"
|
name="$(echo "${name}" | tr -d "\r")"
|
||||||
echo "${name}"
|
echo "${name}"
|
||||||
sub="${root}/simple/${name}"
|
sub="${root}/simple/${name}"
|
||||||
mkdir --parents "${sub}"
|
mkdir --parents "${sub}"
|
||||||
mv -i "${root}/${file_name}-"* "${sub}/"
|
mv -i "${root}/${file_name}-"* "${sub}/"
|
||||||
done
|
done
|
||||||
|
|
||||||
export PATH="${OLD_PATH}"
|
export PATH="${OLD_PATH}"
|
||||||
unset OLD_PATH VIRTUAL_ENV
|
unset OLD_PATH VIRTUAL_ENV
|
||||||
|
|
Loading…
Reference in a new issue