[Slackbuilds-users] Content Disposition part 2

Andrew Payne phalange at komputermatrix.com
Sat Apr 30 16:17:16 UTC 2022


Hi all, revisiting the Github tarball 'content disposition' problem.

While manually tweaking the tarball url to

https://github.com/DEVELOPER/PRGNAM/archive/refs/tags/vVERSION/PRGNAM-VERSION.tar.gz

works, I have a case where the devs use underscores instead of dots and I
cannot seem to get a workable url with the above.

The result is that using wget or in my case python's urllib.request I get
a truncated tarball name, whereas downloading with firefox will retrieve
the full name.

Before I dive into how to manually fix the url or fool with content
disposition, what about using some variant of this in the slackbuild:

tar xvf $CWD/$SRCNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz

This means I can copy paste the Github tarball url into the *.info file,
and it matters not how the user downloads it.

Thoughts?




More information about the SlackBuilds-users mailing list