From 5b1656b7aa2ed424be6be971be55031d1bb5077e Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 29 Sep 2024 23:14:09 +0200 Subject: [PATCH] exit --- py.pypi.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/py.pypi.sh b/py.pypi.sh index 69b7ead..1545b8c 100755 --- a/py.pypi.sh +++ b/py.pypi.sh @@ -73,11 +73,14 @@ for version in "os" "3.12" "3.11" "3.10" "pypy3.10"; do case "${file}" in *.tar.gz) meta_data="${file_name}-${file_version}/${file_name}.egg-info/PKG-INFO" - tar xf "${wheel}" -C "${tmp}" "${meta_data}" + if ! tar xf "${wheel}" -C "${tmp}" "${meta_data}"; then + meta_data="${file_name}-${file_version}/PKG-INFO" + tar xf "${wheel}" -C "${tmp}" "${meta_data}" || exit + fi ;; *.whl) meta_data="${file_name}-${file_version}.dist-info/METADATA" - unzip "${wheel}" "${meta_data}" -d "${tmp}" + unzip "${wheel}" "${meta_data}" -d "${tmp}" || exit ;; esac name="$(grep "${prefix}" "${tmp}/${meta_data}" | sed "s|${prefix}||")"