Closed th0ma7 closed 4 years ago
Release source code package is auto generated by Github.
When downloading through Github web page, it looks correct with SVT-HEVC
:
But from the release web pate archive download URL doesn't include the SVT-HEVC
part.
That seems to be a browser/html thing https://stackoverflow.com/questions/3102226/how-to-set-name-of-file-downloaded-from-browser
You are absolutely right, I thought this was an exception but no. Closing the issue.
Depending on the project, I would recommend trying to use the headers to try to get the filename or use -J
with curl if possible
# Get filename
_tarball_url=$(curl -L https://api.github.com/repos/OpenVisualCloud/SVT-HEVC/releases/latest | jq -r ."tarball_url")
filename=$(curl -IL "$_tarball_url" | tr ' ' '\n' | grep filename | cut -d= -f2)
curl -oL "${filename:-SVT-HEVC.tar.gz}" "$_tarball_url"
or
curl -OJL https://api.github.com/repos/OpenVisualCloud/SVT-HEVC/tarball/v1.4.3
he filename for all releases doesn't include the package name but rather only the version:
This will eventually cause issues for packagers. At the very least
svt-hevc_v1.4.3.tar.gz
or similar would be meaningful