hide some files

This commit is contained in:
2022-08-03 22:26:41 +03:00
parent 6bd277aee7
commit d6d97ebc33

View File

@@ -14,7 +14,7 @@ print_help() {
search_package() {
local package=$1
curl https://pypi.org/project/$package/\#files -s | grep -Eo https://files\.+\.+whl | grep -Ev 'macos|arch|arm' > urls.txt
curl https://pypi.org/project/$package/\#files -s | grep -Eo https://files\.+\.+whl | grep -Ev 'macos|arch|arm|cp27' > urls.txt
}
download_package() {
@@ -43,7 +43,7 @@ upload_packages() {
remove_all_packages() {
rm *.whl *.tar.gz urls.txt
rm *.whl *.tar.gz
}
@@ -58,9 +58,9 @@ install_requriments() {
}
create_new_requriments() {
pip freeze > requirments.txt
grep -Eo '^\w[^==]+' requirments.txt > new_requirments.txt
rm requirments.txt
pip freeze > .requirments.txt
grep -Eo '^\w[^==]+' .requirments.txt > .new_requirments.txt
rm .requirments.txt
}
@@ -75,10 +75,11 @@ main() {
install_requriments $@
create_new_requriments
remove_venv
cat new_requirments.txt | while read line; do
cat .new_requirments.txt | while read line; do
search_package $line
download_package
done
rm .new_requirments.txt urls.txt
elif [[ $# -eq 2 ]]; then
upload_packages $@
remove_all_packages