I added some functionality to my slackbuild generator script <https://github.com/bassmadrigal/scripts/blob/master/sbgen.sh> last year to make sure source links to github always link to the proper location so it works with or without content disposition. I also added support for pythonhosted and pypi links to get the non-hashed download link so I can more easily use my version-bump script <https://github.com/bassmadrigal/scripts/blob/master/version-bump.sh> to update my packages (since the hash in the URL would change for every new version of that program).
After thinking about doing this for some time and seeing a few recent emails about github download problems, I finally decided to excise it from my script and tweak it so it can be used standalone for people to check their github and python links. It's built as a function, so you can add it to your own script, add it to your environment, or just pass a URL to the script. Feel free to test it and let me know if you find any issues. I've been using it for well over a year and it seems to be working fine. I present, check-source-download.sh <https://github.com/bassmadrigal/scripts/blob/master/check-source-download.sh> : $ check-source-download.sh https://github.com/nucleic/kiwi/releases/download/1.4.5/kiwisolver-1.4.5.tar.gz https://github.com/nucleic/kiwi/releases/download/1.4.5/kiwisolver-1.4.5.tar.gz $ check-source-download.sh https://github.com/nucleic/kiwi/archive/refs/tags/1.4.5.tar.gz https://github.com/nucleic/kiwi/archive/refs/tags/1.4.5/kiwi-1.4.5.tar.gz $ check-source-download.sh https://github.com/nucleic/kiwi/archive/03adafeb0f1188e34cde4c7ca8fe384912bd9e1b.zip https://github.com/nucleic/kiwi/archive/03adafe/kiwi-03adafeb0f1188e34cde4c7ca8fe384912bd9e1b.tar.gz $ check-source-download.sh https://github.com/nucleic/kiwi/archive/03adafeb0f1188e34cde4c7ca8fe384912bd9e1b.tar.gz https://github.com/nucleic/kiwi/archive/03adafe/kiwi-03adafeb0f1188e34cde4c7ca8fe384912bd9e1b.tar.gz $ check-source-download.sh https://files.pythonhosted.org/packages/0f/ed/a02b18943f9162644f90354fe6445410e942c857dd21ded758f630ba41c0/pymediainfo-6.1.0.tar.gz https://files.pythonhosted.org/packages/source/p/pymediainfo/pymediainfo-0.1.6.tar.gz Jeremy
_______________________________________________ SlackBuilds-users mailing list [email protected] https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/
